summaryrefslogtreecommitdiff
path: root/libcxx/test/std/strings/basic.string/char.bad.verify.cpp
AgeCommit message (Collapse)Author
2025-04-09[libc++] P3247R2: Deprecate `is_trivial(_v)` (#130573)A. Jiang
Requirements on character-like types are updated unconditionally, because `basic_string` does requires the default-constructibility. It might be possible to make `basic_string_view` support classes with non-public trivial default constructor, but this doesn't seem sensible. libcxxabi's `ItaniumDemangle.h` is also updated to avoid deprecated features.
2025-02-25[libc++] Make .verify.cpp tests more robust against changing headers (#128703)Nikolas Klauser
This is fixes the tests for the frozen headers, but is an improvement either way.
2024-12-21[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)Nikolas Klauser
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.
2023-09-28[libc++][NFC] Simplify checks for static assertions in .verify.cpp tests ↵Louis Dionne
(#67559) We don't neeed to handle both spellings anymore since we don't support Clang 15 anymore.
2023-09-01[libc++] Apply clang formatting to all string unit testsBrendan Emery
This applies clang-format to the std::string unit tests in preparation for landing https://reviews.llvm.org/D140550. Differential Revision: https://reviews.llvm.org/D140612
2022-07-25Rewording "static_assert" diagnosticsMuhammad Usman Shahid
This patch rewords the static assert diagnostic output. Failing a _Static_assert in C should not report that static_assert failed. This changes the wording to be more like GCC and uses "static assertion" when possible instead of hard coding the name. This also changes some instances of 'static_assert' to instead be based on the token in the source code. Differential Revision: https://reviews.llvm.org/D129048
2022-07-21Revert "Rewording the "static_assert" to static assertion"Erich Keane
Looks like we again are going to have problems with libcxx tests that are overly specific in their dependency on clang's diagnostics. This reverts commit 6542cb55a3eb115b1c3592514590a19987ffc498.
2022-07-21Rewording the "static_assert" to static assertionMuhammad Usman Shahid
This patch is basically the rewording of the static assert statement's output(error) on screen after failing. Failing a _Static_assert in C should not report that static_assert failed. It’d probably be better to reword the diagnostic to be more like GCC and say “static assertion” failed in both C and C++. consider a c file having code _Static_assert(0, "oh no!"); In clang the output is like: <source>:1:1: error: static_assert failed: oh no! _Static_assert(0, "oh no!"); ^ ~ 1 error generated. Compiler returned: 1 Thus here the "static_assert" is not much good, it will be better to reword it to the "static assertion failed" to more generic. as the gcc prints as: <source>:1:1: error: static assertion failed: "oh no!" 1 | _Static_assert(0, "oh no!"); | ^~~~~~~~~~~~~~ Compiler returned: 1 The above can also be seen here. This patch is about rewording the static_assert to static assertion. Differential Revision: https://reviews.llvm.org/D129048
2022-06-30Improve the formatting of static_assert messagesCorentin Jabot
Display 'static_assert failed: message' instead of 'static_assert failed "message"' to be consistent with other implementations and be slightly more readable. Reviewed By: #libc, aaron.ballman, philnik, Mordante Differential Revision: https://reviews.llvm.org/D128844
2022-04-05[libc++] Tidy up tests for deduction guides and other compile-time failing ↵Louis Dionne
properties in std::string Instead of using `.fail.cpp` tests, use `.verify.cpp` to check for the exact reason of the failure. In the case of deduction guides, use SFINAE based tests instead since that is our preferred way of testing those. Finally, ensure that we actually run the test in `iter_alloc_deduction.pass.cpp`, since we were not running anything before. Differential Revision: https://reviews.llvm.org/D123055