LWG3781 The exposition-only alias templates cont-key-type and
cont-mapped-type should be removed
Libc++ never implemented these aliases.
Reviewed By: #libc, philnik, ldionne
Differential Revision: https://reviews.llvm.org/D142912
LWG2970 Return type of std::visit misspecified
Was applied in D86006 including tests.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142840
LWG3798 Rvalue reference and iterator_category
The changes are only applied to `ranges::transform_view`, the other
views haven't been implemented yet.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142815
LWG3764 reference_wrapper::operator() should propagate noexcept
As drive-by adds constexpr to the synopsis, since it has already been
implemented.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142814
Lets the tuple formatter use the retarget buffer added for the range
formatter.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142838
The patch
430b397f67 ("[libc++] Granularize <type_traits> includes in <iterator>") missed some exports in the modulemap with became apparent in the reverting commit 12cb1cb372.
This fixes the issue by updating the modulemap. Note that the Clang ICE is not fixed by this change.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142690
We've been shipping <coroutine> since LLVM 14, so LLVM 17 won't ship
the <experimental/coroutine> header per our policy for removing TSes.
Differential Revision: https://reviews.llvm.org/D108697
Our implementation of std::format assumed that string_view's iterators
were raw pointers in various places. If we want to introduce a checked
iterator in debug mode, that won't be true anymore. This patch removes
that assumption.
Differential Revision: https://reviews.llvm.org/D138795
This caused false container-overflow errors when using a custom allocator that
touches the memory on deallocation: GitHub Issue #60384
> This revision is a part of a series of patches extending
> AddressSanitizer C++ container overflow detection
> capabilities by adding annotations, similar to those existing
> in std::vector, to std::string and std::deque collections.
> These changes allow ASan to detect cases when the instrumented
> program accesses memory which is internally allocated by
> the collection but is still not in-use (accesses before or
> after the stored elements for std::deque, or between the size and
> capacity bounds for std::string).
>
> The motivation for the research and those changes was a bug,
> found by Trail of Bits, in a real code where an out-of-bounds read
> could happen as two strings were compared via a std::equals function
> that took iter1_begin, iter1_end, iter2_begin iterators
> (with a custom comparison function).
> When object iter1 was longer than iter2, read out-of-bounds on iter2
> could happen. Container sanitization would detect it.
>
> In revision D132522, support for non-aligned memory buffers (sharing
> first/last granule with other objects) was added, therefore the
> check for standard allocator is not necessary anymore.
> This patch removes the check in std::vector annotation member
> function (__annotate_contiguous_container) to support
> different allocators.
>
> If you have any questions, please email:
> - advenam.tacet@trailofbits.com
> - disconnect3d@trailofbits.com
>
> Reviewed By: #libc, #sanitizers, philnik, vitalybuka
>
> Spies: EricWF, philnik, #sanitizers, libcxx-commits
>
> Differential Revision: https://reviews.llvm.org/D136765
This reverts commit 4905550268.
LWG3754 Class template expected synopsis contains declarations that do
not match the detailed description
This parts of the detailed synopsis that is not copied in libc++, so
effectively there's nothing to do.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D142809
They are not needed in <new> -- in fact they are only needed in .cpp files.
Getting those out of the way makes the headers smaller and also makes it
easier to use the library on platforms where aligned allocation is not
available.
Differential Revision: https://reviews.llvm.org/D139231
This revision is a part of a series of patches extending
AddressSanitizer C++ container overflow detection
capabilities by adding annotations, similar to those existing
in std::vector, to std::string and std::deque collections.
These changes allow ASan to detect cases when the instrumented
program accesses memory which is internally allocated by
the collection but is still not in-use (accesses before or
after the stored elements for std::deque, or between the size and
capacity bounds for std::string).
The motivation for the research and those changes was a bug,
found by Trail of Bits, in a real code where an out-of-bounds read
could happen as two strings were compared via a std::equals function
that took iter1_begin, iter1_end, iter2_begin iterators
(with a custom comparison function).
When object iter1 was longer than iter2, read out-of-bounds on iter2
could happen. Container sanitization would detect it.
In revision D132522, support for non-aligned memory buffers (sharing
first/last granule with other objects) was added, therefore the
check for standard allocator is not necessary anymore.
This patch removes the check in std::vector annotation member
function (__annotate_contiguous_container) to support
different allocators.
If you have any questions, please email:
- advenam.tacet@trailofbits.com
- disconnect3d@trailofbits.com
Reviewed By: #libc, #sanitizers, philnik, vitalybuka
Spies: EricWF, philnik, #sanitizers, libcxx-commits
Differential Revision: https://reviews.llvm.org/D136765
GCC rejects ABI tags on non mangled functions, as they would otherwise
be a no-op. This commit replaces such instances with equivalent
_LIBCPP_HIDE_FROM_ABI constants but without ABI tags attached.
.../include/c++/v1/__support/musl/xlocale.h:28:68: error: 'abi_tag'
attribute applied to extern "C" declaration 'long long int
strtoll_l(const char*, char**, int, locale_t)'
28 | strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) {
| ^
Bug: https://bugs.gentoo.org/869038
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142415
This changes the mechanism for verbose termination (again!) to make it
support compile-time customization in addition to link-time customization,
which is important for users who need fine-grained control over what code
gets generated around sites that call the verbose termination handler.
This concern had been raised to me both privately by prospecting users
and in https://llvm.org/D140944, so I think it is clearly worth fixing.
We still support _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED for
a limited time since the same functionality can be achieved by overriding
the _LIBCPP_VERBOSE_ABORT macro.
Differential Revision: https://reviews.llvm.org/D141326
The contiguous range made incorrect assumptions for certain input
ranges.
Fixes llvm.org/PR60164
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142302
The paper
- P2286R8 Formatting ranges
is fully implemented modulo its feature test macro. This macro has been
revised by
- LWG3750 Too many papers bump __cpp_lib_format
The new macro depends on
- P2585R0 Improving default container formatting
This paper revises parts of P2286R8 and adds new formatter
specializations. The specialization for debug strings has some wording
issues, which is addresses in this paper
- P2733R0 Fix handling of empty specifiers in std::format
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D142153
- implement `std::ranges::split_view` (last c++20 view)
- Work in process on testing iterator/sentinel, but since we are
getting closer to the deadline, I'd like to send the review early
Differential Revision: https://reviews.llvm.org/D142063
__exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means that we don't provide the strong exception guarantees. However, Clang doesn't generate cleanup code with exceptions disabled, so even if we wanted to provide the strong exception guarantees we couldn't. This is also only relevant for constructs with a stack of -fexceptions > -fno-exceptions > -fexceptions code, since the exception can't be caught where exceptions are disabled. While -fexceptions > -fno-exceptions is quite common (e.g. libc++.dylib > -fno-exceptions), having another layer with exceptions enabled seems a lot less common, especially one that tries to catch an exception through -fno-exceptions code.
Fixes https://github.com/llvm/llvm-project/issues/56783
Reviewed By: ldionne, Mordante, huixie90, #libc
Spies: EricWF, alexfh, hans, joanahalili, libcxx-commits
Differential Revision: https://reviews.llvm.org/D133661
This makes it easier to specialize traits classes, like __segmented_iterator_traits.
Reviewed By: var-const, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D142276
`<coroutine>` seems to be new enough to not be a huge problem.
Reviewed By: Mordante, #libc
Spies: libcxx-commits, ChuanqiXu
Differential Revision: https://reviews.llvm.org/D140600
There are no tests for the aliases because clang doesn't diagnose deprecated template aliases currently.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D127678
This at least allows us to stand up libc++ FreeBSD CI and avoid future
regressions. The failures do need to be addressed, and can be done
iteratively.
Reviewed By: philnik, Mordante
Differential Revision: https://reviews.llvm.org/D141542
This makes it a lot easier to specialize traits types for it, like __segmented_iterator_traits.
Reviewed By: var-const, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D141454
`_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` doesn't do anything anymore in C++23 mode, so it's now just a duplicate of the C++23 configuration.
Also add new steps to the post-release checklist for updating the supported compilers.
Reviewed By: ldionne, #libc
Spies: arichardson, libcxx-commits, arphaman
Differential Revision: https://reviews.llvm.org/D133364