|
Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
| #
b9a2658a |
| 21-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as discussed in https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-
[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as discussed in https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the RFC, we initially proposed selecting the right headers from the Clang driver, however consensus seemed to steer towards handling this in the library itself. This patch implements that direction.
At a high level, the changes basically amount to making each public header look like this:
``` // inside <vector> #ifdef _LIBCPP_CXX03_LANG # include <__cxx03/vector> #else // normal <vector> content #endif ```
In most cases, public headers are simple umbrella headers so there isn't much code in the #else branch. In other cases, the #else branch contains the actual implementation of the header.
show more ...
|
|
Revision tags: llvmorg-19.1.6 |
|
| #
c166a9c7 |
| 10-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add #if 0 block to all the top-level headers (#119234)
Including The frozen C++03 headers results in a lot of formatting changes in the main headers, so this splits these changes into a sep
[libc++] Add #if 0 block to all the top-level headers (#119234)
Including The frozen C++03 headers results in a lot of formatting changes in the main headers, so this splits these changes into a separate commit instead.
This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.
show more ...
|
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
| #
e99c4906 |
| 31-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <cstddef> includes (#108696)
|
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
| #
dfddc0c4 |
| 18-Jul-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Include the rest of the detail headers by version in the umbrella headers (#96032)
This is a follow-up to #83740.
|
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4 |
|
| #
f4e3226a |
| 12-Apr-2024 |
Xiaoyang Liu <siujoeng.lau@gmail.com> |
[libc++][ranges] LWG3736: move_iterator missing disable_sized_sentinel_for specialization (#85611)
This pull request implements LWG3736: move_iterator missing
disable_sized_sentinel_for specializat
[libc++][ranges] LWG3736: move_iterator missing disable_sized_sentinel_for specialization (#85611)
This pull request implements LWG3736: move_iterator missing
disable_sized_sentinel_for specialization.
show more ...
|
|
Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1 |
|
| #
37dca605 |
| 29-Feb-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Clean up includes of <__assert> (#80091)
Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
th
[libc++] Clean up includes of <__assert> (#80091)
Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
that mechanism anymore, we don't need to declare __libcpp_verbose_abort
from all public headers, and we can clean up a lot of unnecessary
includes.
This patch also moves the definition of the various assertion categories
to the <__assert> header, since we now rely on regular IWYU for these
assertion macros.
rdar://105510916
show more ...
|
|
Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
| #
a65070a7 |
| 29-Oct-2023 |
philnik777 <nikolasklauser@berlin.de> |
[libc++] Remove a few transitive includes (#70553)
|
| #
cb950c9d |
| 27-Oct-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Make sure we implement and test LWG2280 properly (#67670)
We did not mark std::begin/std::end as noexcept for C-style arrays, we
did not have conditional noexcept on cbegin/cend, and we di
[libc++] Make sure we implement and test LWG2280 properly (#67670)
We did not mark std::begin/std::end as noexcept for C-style arrays, we
did not have conditional noexcept on cbegin/cend, and we did not mark
array cbegin/cend as constexpr in all Standard modes. Since this is a
LWG issue, we should implement it as a DR in all Standard modes as
usual.
This patch fixes these issues and adds test coverage. Fixes #67471.
show more ...
|
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2 |
|
| #
000940e2 |
| 28-Sep-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Refactor the tests for [iterator.range] (#67496)
The tests were a bit of a mess -- the testing coverage wasn't bad but it
was extremely difficult to see what was being tested and where. I
[libc++] Refactor the tests for [iterator.range] (#67496)
The tests were a bit of a mess -- the testing coverage wasn't bad but it
was extremely difficult to see what was being tested and where. I split
up the tests to make them easier to audit for completeness and did such
an audit, adding a few missing tests (e.g. the conditional noexcept-ness
of std::cbegin and std::cend). I also audited the synopsis and adjusted
it where it needed to be adjusted.
This patch is in preparation of fixing #67471.
show more ...
|
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
| #
b5270ba2 |
| 29-Jun-2023 |
varconst <varconsteq@gmail.com> |
[libc++] Remove the legacy debug mode.
See https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026
Reviewed By: #libc, Mordante, ldionne
Differential Revision: https://revi
[libc++] Remove the legacy debug mode.
See https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026
Reviewed By: #libc, Mordante, ldionne
Differential Revision: https://reviews.llvm.org/D153672
show more ...
|
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
| #
75196f8e |
| 08-Jan-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove <cstdlib> includes
We changed the `abort` calls when trying to throw exceptions in `-fno-exceptions` mode to `__verbose_abort` calls, which removes the dependency in most files.
Rev
[libc++] Remove <cstdlib> includes
We changed the `abort` calls when trying to throw exceptions in `-fno-exceptions` mode to `__verbose_abort` calls, which removes the dependency in most files.
Reviewed By: ldionne, #libc
Spies: dim, emaste, mikhail.ramalho, smeenai, libcxx-commits
Differential Revision: https://reviews.llvm.org/D146076
show more ...
|
| #
813e1da9 |
| 01-Mar-2023 |
Shivam kunwar <shivam.kunwar@kdab.com> |
[libc++] implement move_iterator<T*> should be a random access iterator \n Differntial Revision- https://reviews.llvm.org/D135248
|
| #
430b397f |
| 20-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <type_traits> includes in <iterator>
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140621
|
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2 |
|
| #
473a1605 |
| 22-Sep-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Fix some standard-mandated includes comments
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D134447
|
|
Revision tags: llvmorg-15.0.1, llvmorg-15.0.0 |
|
| #
e31c2a1b |
| 02-Sep-2022 |
Mark de Wever <koraq@xs4all.nl> |
[NFC][libc++] Moves transitive includes location.
As discussed in D132284 they will be moved to the end.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D133212
|
|
Revision tags: llvmorg-15.0.0-rc3 |
|
| #
8ff2d6af |
| 20-Aug-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Reduces the number of transitive includes.
This defines a new policy for removal of transitive includes. The goal of the policy it to make it relatively easy to remove headers when needed,
[libc++] Reduces the number of transitive includes.
This defines a new policy for removal of transitive includes. The goal of the policy it to make it relatively easy to remove headers when needed, but avoid breaking developers using and vendors shipping libc++.
The method used is to guard transitive includes based on the C++ language version. For the upcoming C++23 we can remove headers when we want, but for other language versions we try to keep it to a minimum.
In this code the transitive include of `<chrono>` is removed since D128577 introduces a header cycle between `<format>` and `<chrono>`. This cycle is indirectly required by the Standard. Our cycle dependency tool basically is a grep based tool, so it needs some hints to ignore cycles. With the input of our transitive include tests we can create a better tool. However that's out of the scope of this patch.
Note the flag `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` remains unchanged. So users can still opt-out of transitives includes entirely.
Reviewed By: #libc, ldionne, philnik
Differential Revision: https://reviews.llvm.org/D132284
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
79a2b4ba |
| 28-Jun-2022 |
Konstantin Varlamov <varconst@apple.com> |
[libc++][ranges] Finish LWG issues directly related to the One Ranges Proposal.
- P1252 ("Ranges Design Cleanup") -- deprecate `move_iterator::operator->` starting from C++20; add range comparison
[libc++][ranges] Finish LWG issues directly related to the One Ranges Proposal.
- P1252 ("Ranges Design Cleanup") -- deprecate `move_iterator::operator->` starting from C++20; add range comparisons to the `<functional>` synopsis. This restores `move_iterator::operator->` that was incorrectly deleted in D117656; it's still defined in the latest draft, see http://eel.is/c++draft/depr.move.iter.elem. Note that changes to `*_result` types from 6.1 in the paper are no longer relevant now that these types are aliases; - P2106 ("Alternative wording for GB315 and GB316") -- add a few `*_result` types to the synopsis in `<algorithm>` (some algorithms are not implemented yet and thus some of the proposal still cannot be marked as done);
Also mark already done issues as done (or as nothing to do): - P2091 ("Fixing Issues With Range Access CPOs") was already implemented (this patch adds tests for some ill-formed cases); - LWG 3247 ("`ranges::iter_move` should perform ADL-only lookup of `iter_move`") was already implemented; - LWG 3300 ("Non-array ssize overload is underconstrained") doesn't affect the implementation; - LWG 3335 ("Resolve C++20 NB comments US 273 and GB 274") was already implemented; - LWG 3355 ("The memory algorithms should support move-only input iterators introduced by P1207") was already implemented (except for testing).
Differential Revision: https://reviews.llvm.org/D126053
show more ...
|
| #
de4a57cb |
| 27-Jun-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Re-add transitive includes that had been removed since LLVM 14
This commit re-adds transitive includes that had been removed by 4cd04d1687f1, c36870c8e79c, a83f4b9cda57, 1458458b558d, 2e2f3
[libc++] Re-add transitive includes that had been removed since LLVM 14
This commit re-adds transitive includes that had been removed by 4cd04d1687f1, c36870c8e79c, a83f4b9cda57, 1458458b558d, 2e2f3158c604, and 489637e66dd3. This should cover almost all the includes that had been removed since LLVM 14 and that would contribute to breaking user code when releasing LLVM 15.
It is possible to disable the inclusion of these headers by defining _LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will enable that macro and start fixing downstream issues immediately. We can then remove the macro (and the transitive includes) by default in a future release. That way, we will break users only once by removing transitive includes in bulk instead of doing it bit by bit a every release, which is more disruptive for users.
Note 1: The set of headers to re-add was found by re-generating the transitive include test on a checkout of release/14.x, which provided the list of all transitive includes we used to provide.
Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map> have been added in this commit. These transitive inclusions were added when we implemented boyer_moore_searcher in <functional>.
Note 3: This is a best effort patch to try and resolve downstream breakage caused since branching LLVM 14. I wasn't able to perfectly mirror transitive includes in LLVM 14 for a few headers, so I added a release note explaining it. To summarize, adding boyer_moore_searcher created a bunch of circular dependencies, so we have to break backwards compatibility in a few cases.
Differential Revision: https://reviews.llvm.org/D128661
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
| #
633d1d0d |
| 06-Jun-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Use bounded iterators in std::span when the debug mode is enabled
Previously, we'd use raw pointers when the debug mode was enabled, which means we wouldn't get out-of-range checking with s
[libc++] Use bounded iterators in std::span when the debug mode is enabled
Previously, we'd use raw pointers when the debug mode was enabled, which means we wouldn't get out-of-range checking with std::span's iterators.
This patch introduces a new class called __bounded_iter which can be used to wrap iterators and make them carry around bounds-related information. This allows iterators to assert when they are dereferenced outside of their bounds.
As a fly-by change, this commit removes the _LIBCPP_ABI_SPAN_POINTER_ITERATORS knob. Indeed, not using a raw pointer as the iterator type is useful to avoid users depending on properties of raw pointers in their code.
This is an alternative to D127401.
Differential Revision: https://reviews.llvm.org/D127418
show more ...
|
| #
c36870c8 |
| 12-Jun-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Removes unneeded includes.
This removes all "TODO: remove these headers" comments from our headers.
Note there seem to be more headers that can be removed, that will be done in separate co
[libc++] Removes unneeded includes.
This removes all "TODO: remove these headers" comments from our headers.
Note there seem to be more headers that can be removed, that will be done in separate commits.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D127592
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
34f73804 |
| 20-May-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove unused __functional includes
Reviewed By: ldionne, #libc
Spies: arichardson, smeenai, libcxx-commits, arphaman
Differential Revision: https://reviews.llvm.org/D126098
|
| #
b06049bc |
| 25-May-2022 |
Konstantin Varlamov <varconst@apple.com> |
[libc++][NFC] Add more tests to `move_{iterator,sentinel}`.
More test coverage for the parts added by the One Ranges Proposal.
Differential Revision: https://reviews.llvm.org/D124906
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
2fb026ee |
| 19-Jan-2022 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
Implement move_sentinel and C++20 move_iterator.
Differential Revision: https://reviews.llvm.org/D117656
|
| #
385cc25a |
| 25-Mar-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Ensure that all public C++ headers include <__assert>
This patch changes the requirement for getting the declaration of the assertion handler from including <__assert> to including any publ
[libc++] Ensure that all public C++ headers include <__assert>
This patch changes the requirement for getting the declaration of the assertion handler from including <__assert> to including any public C++ header of the library. Note that C compatibility headers are excluded because we don't implement all the C headers ourselves -- some of them are taken straight from the C library, like assert.h.
It also adds a generated test to check it. Furthermore, this new generated test is designed in a way that will make it possible to replace almost all the existing test-generation scripts with this system in upcoming patches.
Differential Revision: https://reviews.llvm.org/D122506
show more ...
|
| #
658957c7 |
| 18-Mar-2022 |
Konstantin Varlamov <varconst@apple.com> |
[libc++][ranges] Implement changes to reverse_iterator from One Ranges Proposal.
Changes in [P0896](https://wg21.link/p0896): - add `disable_sized_sentinel_for`; - add `iter_move` and `iter_swap`; -
[libc++][ranges] Implement changes to reverse_iterator from One Ranges Proposal.
Changes in [P0896](https://wg21.link/p0896): - add `disable_sized_sentinel_for`; - add `iter_move` and `iter_swap`; - add a `requires` clause to the `operator->`; - add `iterator_concept`; - check that the `Iterator` template parameter is a bidirectional iterator; - add constraints to all comparison operators; - change the definitions of `iterator_category`, `value_type`, `difference_type` and `reference` (changes to `iterator_category` were already implemented).
Also add a few forgotten things to the `reverse_iterator` synopsis (notably the spaceship operator).
Differential Revision: https://reviews.llvm.org/D120180
show more ...
|