| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Implement P2505R5(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2505r5.html)
Reviewed By: #libc, philnik, ldionne
Differential Revision: https://reviews.llvm.org/D140911
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ebc111b08bddca55d5f7e560a20bdb2c913d80cb.
Sorry, I forgot to append Phabricator reversion when land D140911, I try to revert this change and reland.
Reviewed By: #libc, ldionne, EricWF
Differential Revision: https://reviews.llvm.org/D150793
|
|
|
|
|
|
| |
consistency
Differential Revision: https://reviews.llvm.org/D150672
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stringstream does works for payload > INT_MAX, however
stringstream::gcount() can break the internal field (__nout_) and this
breaks the stringstream itself, and so the program will crash.
Fix this, by using __pbump(streamsize) over pbump(int)
Note, libstdc++ does not have this bug.
Reviewed By: #libc, ldionne, Mordante
Spies: arichardson, Mordante, philnik, ldionne, libcxx-commits, mikhail.ramalho
Differential Revision: https://reviews.llvm.org/D146294
|
|
|
|
| |
Fix some nits in ranges::starts_with
|
|
|
|
| |
Signed-off-by: yronglin <yronglin777@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 65429b9af6a2c99d340ab2dcddd41dab201f399c.
Broke several projects, see https://reviews.llvm.org/D144509#4347562 onwards.
Also reverts follow-up commit "[OpenMP] Compile assembly files as ASM, not C"
This reverts commit 4072c8aee4c89c4457f4f30d01dc9bb4dfa52559.
Also reverts fix attempt "[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump"
This reverts commit 7d47dac5f828efd1d378ba44a97559114f00fb64.
|
|
|
|
|
|
|
|
|
| |
- add the `from_range_t` constructors and the related deduction guides;
- add the `insert_range`/`assign_range`/etc. member functions.
(Note: this patch is split from https://reviews.llvm.org/D142335)
Differential Revision: https://reviews.llvm.org/D149827
|
|
|
|
|
|
|
|
|
| |
This change contains three util classes that were out from D145183 to make incremental progress
- automic_unique_lock
- intrusive_list
- intrusive_shared_ptr
Differential Revision: https://reviews.llvm.org/D150205
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds std::extents. extents is one of the core classes used by std::mdspan. It describes a multi-dimensional index space with a mix of compile time and runtime sizes. Furthermore, it is templated on the index type used to describe the multi-dimensional index space.
The class is designed to be highly optimizable in performance critical code sections, and is fully useable in constant expressions contexts.
Testing of this class tends to be somewhat combinatorical, due to the large number of possible corner cases involved in situations where we have both runtime and compile time extents. To add to this, the class is designed to be interoperable (in particular constructible) from arguments which only need to be convertible to the index_type, but are otherwise arbitrary user types. For a larger discussion on the design of this class refer to: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html
Co-authored-by: Damien L-G <dalg24@gmail.com>
Reviewed By: ldionne, #libc
Spies: libcxx-commits, H-G-Hristov, tschuett, philnik, arichardson, Mordante, crtrott
Differential Revision: https://reviews.llvm.org/D148067
|
|
|
|
|
|
|
|
| |
Reviewed By: #libc, philnik, Mordante
Spies: Mordante, philnik, libcxx-commits
Differential Revision: https://reviews.llvm.org/D148641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The source file is used to anchor the destructor of format_error. When
format is moved from experimental to stable this code would move to the
dylib. One issue with code in the dylib is that it can't be used in
constexpr context. There is a proposal to make format work during
constant evaluation
P2758 Emitting messages at compile time
This paper has initially been received favourable by EWG. Therefore move
the code to the header. This also avoids possible availability issues on
Mac back deployment targets.
Note it is expected that format will no longer be experimental with the
next LLVM release.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150073
|
|
|
|
|
|
|
| |
This was requested in the review of D145807, but I had missed to
apply it before landing the patch.
Differential Revision: https://reviews.llvm.org/D150444
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: jloser, libcxx-commits
Differential Revision: https://reviews.llvm.org/D149706
|
|
|
|
|
| |
I had not seen https://reviews.llvm.org/D150585 which supersedes
this, and I want to avoid merge conflicts for D150585.
|
|
|
|
|
| |
I didn't notice in the review that clang-format made a poor job at
formatting the test so I went back and did it manually.
|
| |
|
|
|
|
|
|
|
|
| |
This was planned for LLVM 15 but was never done.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D150580
|
| |
|
|
|
|
|
|
| |
This reverts commit b049fc0481bc387f57fd61da7239f85ef91096c1.
The wrong patch was landed.
|
|
|
|
|
| |
It was confusing to some contributors because it appeared in a
prominent place on the Contibuting page.
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: jloser, libcxx-commits
Differential Revision: https://reviews.llvm.org/D149706
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D149615
|
|
|
|
|
|
| |
This reverts commit cbd9e5454741ebe6b39521fe1a8ed4eed5c2c801.
The wrong patch was landed.
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D149615
|
|
|
|
|
|
|
|
| |
This was discovered while working on modules.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D149351
|
|
|
|
|
|
|
|
| |
Module map generation for the private detail headers is easier done if each private header is by itself in a submodule. Move the __algorithm/pstl_backends into their own submodules.
Reviewed By: philnik, #libc
Differential Revision: https://reviews.llvm.org/D150503
|
|
|
|
|
|
|
|
|
|
| |
__cpp_lib_atomic_is_always_lock_free
Reviewed By: #libc, ldionne, Mordante
Spies: Mordante, libcxx-commits
Differential Revision: https://reviews.llvm.org/D150421
|
|
|
|
|
|
| |
The owner of the last two failing buildbots updated CMake.
This reverts commit e8e8707b4aa6e4cc04c0cffb2de01d2de71165fc.
|
|
|
|
|
|
|
|
| |
Like done D149543 this validates the other formatter specializations.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D150041
|
|
|
|
|
|
|
|
|
|
| |
scheme
Reviewed By: ldionne, #libc
Spies: arichardson, pcwang-thead, libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D150277
|
|
|
|
|
|
| |
One of the overload of the constructors should check Bound is not unreachable_sentinel_t, instead of the Start
Differential Revision: https://reviews.llvm.org/D150206
|
|
|
|
|
|
|
|
|
|
|
| |
The newer formatters for (tuple, vector<bool>::reference) specify the
formatter's parse and format member function. This signature is slightly
different from the signature for existing formatters. Adapt the existing
formatters to the new style.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The financial cost of the network I/O for the Clang install artifacts is
quite significant. afd3478f37c8 improved this by creating tarballs. This
commit improves the tarball by using xz compression instead of gzip. This
option is the slowest, but gives the smallest size.
size time time
(compression) (decompression)
gzip 51 M 7 s 1.2 s
bz2 44 M 17 s 5.8 s
xz 33 M 76 s 3.1 s
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150062
|
|
|
|
|
|
|
|
|
|
| |
This allows backends to customize arbitrary parallel algorithms, which was requested pretty often.
Reviewed By: #libc, ldionne
Spies: arichardson, miyuki, crtrott, dalg24, __simt__, philnik, libcxx-commits
Differential Revision: https://reviews.llvm.org/D149686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several tests undefined __DEPRECATED to avoid warnings as they're
testing the deprecated ext/hash_map. A better way to do this is to use
-Wno-deprecated so it isn't defined in the first place. This prevents
these tests from failing when we give a warning when undefining the
__DEPRECATED macro, as D144654 will do.
For the generated tests however just remove the testing of these
header files, so we don't disable the warning when testing the other
header files.
Differential Revision: https://reviews.llvm.org/D145691
|
|
|
|
|
|
|
|
|
|
|
| |
Several PSTL headers included by <algorithm> are missing includes for things they use.
Switch some quoted includes to angle includes.
(Issues found from running `check-cxx` with https://reviews.llvm.org/D144322)
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150085
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libc++'s `wchar.h`, before we forward to the system `wchar.h`, we set `__CORRECT_ISO_CPP_WCHAR_H_PROTO` to ensure it defines the correct signature (e.g. `extern "C++" const wchar_t *wmemchr` and not `extern wchar_t *wmemchr`). After D148542, there are cases where we include the system `wchar.h` from within `__mbstate_t.h` without setting that, and so we get a function type mismatch if we transitively include `wchar.h` through multiple headers in a modules-enabled build. Consistently setting it here resolves those build errors.
Alternative 1: we could put this in `__config` instead. I chose to put it here for a more limited scope.
Alternative 2: we could patch `wchar.h` itself to work correctly and remove references `__CORRECT_ISO_CPP_WCHAR_H_PROTO` from libc++ entirely. It does already set it, but with an additional condition that it is being built by GCC >= 4.4. Clang does pretend to be GCC via `__GNUC__` etc. which can be controlled via `-fgnuc-version` command line flags, but that might have other consequences.
Reviewed By: ldionne, #libc, MaskRay
Differential Revision: https://reviews.llvm.org/D150015
|
|
|
|
| |
The exact same declaration exists a few lines above.
|
| |
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150201
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: sstefan1, jplehr, arichardson, libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D150217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduced an optimization to std::sort in 4eddbf9f10a6. However,
that optimization led to issues where users that were passing invalid
comparators to std::sort could start seeing OOB reads. This led to
the revert of the std::sort optimization from the LLVM 16 release
(see https://llvm.org/D146421).
This patch introduces _LIBCPP_ASSERTs to the places in the algorithm
where we make an assumption that the comparator will be consistent and
hence avoid a bounds check based on that. If the comparator happens not
to be consistent with itself, these are the places where we would
incorrectly go out of bounds. This allows users that enable libc++
assertions to catch such misuse at the cost of basically a bounds
check. For users that do not enable libc++ assertions (which is 99.9%
of users since assertions are off by default), this is basically a
no-op, and in fact the assertion will turn into a __builtin_assume,
making it explicit to the compiler that it can rely on the fact that
we're not going out of bounds.
I think this patch strikes the right balance. Folks that want absolute
performance will get what they want, since it is a precondition for the
comparator to be consistent, so the bounds checks are technically not
mandatory. Folks who want more safety *already* need to be enabling
libc++ assertions to catch other types of bugs (like operator[] OOB),
so this solution should also work for them.
I do think we have a lot of work towards popularizing the use of libc++
assertions and integrating it better so that users don't have to know
about the obscure _LIBCPP_ENABLE_ASSERTIONS macro to enable them, but
that's a separate concern.
rdar://106897934
Differential Revision: https://reviews.llvm.org/D147089
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an extension to std::pair in C++03 mode where we provide an
assignment operator from a pair<U, V>. Previously, any code trying to
trigger such an assignment operator would have tried using the
`operator=(pair const&)` copy assignment operator, which would then
have tried creating a `pair const&` by using the unconstrained
pair<U, V> constructor.
After this patch, pair will instead go through operator= directly if
its member types are assignable. If they are not assignable, the extension
operator= is disabled with SFINAE and the pair(pair<U, V>) constructor
will be used. Since that constructor is unconstrained, that will either
work or give a hard error.
This should be pretty transparent to users, but this is technically a
behavior change in C++03. Indeed, if a type has both a valid cross-type
assignment operator *and* a valid cross-type constructor, the library
will now prefer the cross-type assignment instead of going through the
cross-type constructor and then using the copy-constructor. Since this
is the mandated behavior in C++11, however, one could argue that any user
broken by that needs to change their code.
The motivation for this change is to allow simplifying the definition
of std::map's value_type, which requires handling assignment to a pair
of references properly. This patch will allow removing complexity from
https://llvm.org/D121485 instead of adding complexity in that patch.
Differential Revision: https://reviews.llvm.org/D150119
|
|
|
|
|
|
|
|
| |
- add the `from_range_t` constructors and the related deduction guides;
- add the `insert_range`/`assign_range`/etc. member functions.
(Note: this patch is split from https://reviews.llvm.org/D142335)
Differential Revision: https://reviews.llvm.org/D149826
|
|
|
|
|
|
|
|
| |
escaped_output.unicode.pass.cpp is failing only on 32-bit AIX. The rest are passing.
Reviewed by: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D149078
|
|
|
|
|
|
|
|
| |
This test was originally unsupported for `LIBCXX-AIX-FIXME` feature because we lacked `-fvisibility=hidden` support. AIX now has visibility support and the test passes in debug mode.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D149255
|
|
|
|
|
|
|
|
| |
Implements part of P1614R2 "The Mothership has Landed"
Reviewed By: Mordante, #libc, philnik
Differential Revision: https://reviews.llvm.org/D132265
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D148553
|