[libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suiteThis should make CI consistent on all the compilers we support. Most ofthis patch is working around
[libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suiteThis should make CI consistent on all the compilers we support. Most ofthis patch is working around various warnings emitted by GCC in our codebase, which are now being shown when we compile the tests.After this patch, the whole test suite should be warning free on allcompilers we support and test, except for a few warnings on GCC thatwe silence explicitly until we figure out the proper fix for them.Differential Revision: https://reviews.llvm.org/D120684
show more ...
[libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI.All supported compilers that support C++20 now support concepts. So, remove`_LIB_LIBCPP_HAS_NO_CONCEPTS` in favor of `_LIBC
[libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI.All supported compilers that support C++20 now support concepts. So, remove`_LIB_LIBCPP_HAS_NO_CONCEPTS` in favor of `_LIBCPP_STD_VER > 17`. Similarly inthe tests, remove `// UNSUPPORTED: libcpp-no-concepts`.Differential Revision: https://reviews.llvm.org/D121528
Revert "[libc++] Remove extension to support allocator<const T>"This reverts commit 276ca873. That commit has quite a history at thispoint. It was first landed in dbc647643577, which broke std::sh
Revert "[libc++] Remove extension to support allocator<const T>"This reverts commit 276ca873. That commit has quite a history at thispoint. It was first landed in dbc647643577, which broke std::shared_ptr<T const>and was reverted in 9138666f5. It was then re-applied in 276ca873, withthe std::shared_ptr issue fixed, but it caused widespread breakage atGoogle (which suggests it would cause similar breakage in the wild too),so now I'm reverting again.Instead, I will add a escape hatch that vendors can turn on to enablethe extension and perform a phased transition over one or two releaseslike we sometimes do when things become non-trivial.
[libc++] Remove extension to support allocator<const T>This extension is a portability trap for users, since no other standardlibrary supports it. Furthermore, the Standard explicitly allowsimple
[libc++] Remove extension to support allocator<const T>This extension is a portability trap for users, since no other standardlibrary supports it. Furthermore, the Standard explicitly allowsimplementations to reject std::allocator<cv T>, so allowing it isreally going against the current.This was discovered in D120684: this extension required `const_cast`ingin `__construct_range_forward`, a fishy bit of code that can be removedif we don't support the extension anymore.This is a re-application of dbc647643577, which was reverted in 9138666f5because it broke std::shared_ptr<T const>. Tests have now been added andwe've made sure that std::shared_ptr<T const> wouldn't be broken in thisversion.Differential Revision: https://reviews.llvm.org/D120996
Revert "[libc++] Remove extension to support allocator<const T>"This reverts commit bed3240bf7d196a17cc31f1c5b59b4721017e638.I will need to add more tests for std::shared_ptr<T const> beforere-l
Revert "[libc++] Remove extension to support allocator<const T>"This reverts commit bed3240bf7d196a17cc31f1c5b59b4721017e638.I will need to add more tests for std::shared_ptr<T const> beforere-landing this.
[libc++] Remove extension to support allocator<const T>This extension is a portability trap for users, since no other standardlibrary supports it. Furthermore, the Standard explicitly allowsimplementations to reject std::allocator<cv T>, so allowing it isreally going against the current.This was discovered in D120684: this extension required `const_cast`ingin `__construct_range_forward`, a fishy bit of code that can be removedif we don't support the extension anymore.Differential Revision: https://reviews.llvm.org/D120996
[libc++] [test] Split "UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges" onto two lines. NFC.
[libc++][ranges] Implement `construct_at` and `destroy{,_at}`.Differential Revision: https://reviews.llvm.org/D116078
[libc++] Remove test-suite annotations for unsupported Clang versionsDifferential Revision: https://reviews.llvm.org/D108471
[libc++] Skip tests using constexpr destructors with older clang versionsIt appears that the released version of clang that supports constexprdestructors is clang 10 and the oldest one that accept
[libc++] Skip tests using constexpr destructors with older clang versionsIt appears that the released version of clang that supports constexprdestructors is clang 10 and the oldest one that accepts -std=c++2a is 5,so mark these as UNSUPPORTED for clang-5 to clang-9.Reviewed By: #libc, ldionneDifferential Revision: https://reviews.llvm.org/D89704
[libc++] Fix constexpr dynamic allocation on GCC 10We're technically not allowed by the Standard to call ::operator new inconstexpr functions like __libcpp_allocate. Clang doesn't seem to complain
[libc++] Fix constexpr dynamic allocation on GCC 10We're technically not allowed by the Standard to call ::operator new inconstexpr functions like __libcpp_allocate. Clang doesn't seem to complainabout it, but GCC does.
[libc++] Implement C++20's P0784 (More constexpr containers)This commit adds std::construct_at, and marks various members ofstd::allocator_traits and std::allocator as constexpr. It also addstest
[libc++] Implement C++20's P0784 (More constexpr containers)This commit adds std::construct_at, and marks various members ofstd::allocator_traits and std::allocator as constexpr. It also addstests and turns the existing tests into hybrid constexpr/runtime tests.Thanks to Richard Smith for initial work on this, and to Michael Parkfor D69803, D69132 and D69134, which are superseded by this patch.Differential Revision: https://reviews.llvm.org/D68364