File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
test/libcxx/assertions/modes Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -784,8 +784,8 @@ config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTER
784
784
config_define_if_not (LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE )
785
785
config_define_if_not (LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS )
786
786
787
- # TODO(LLVM 19): Produce a deprecation warning.
788
787
if (LIBCXX_ENABLE_ASSERTIONS )
788
+ message (DEPRECATION "LIBCXX_ENABLE_ASSERTIONS is deprecated and will be removed in LLVM 20. Please use LIBCXX_HARDENING_MODE instead." )
789
789
set (LIBCXX_HARDENING_MODE "extensive" )
790
790
endif ()
791
791
if (LIBCXX_HARDENING_MODE STREQUAL "none" )
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ Deprecations and Removals
89
89
This decision is based on LEWGs discussion on `P3122 <https://wg21.link/P3122> ` and `P3162 <https://wg21.link/P3162> `
90
90
to not use ``[[nodiscard]] `` in the standard.
91
91
92
- - TODO: The ``LIBCXX_ENABLE_ASSERTIONS `` CMake variable that was used to enable the safe mode has been deprecated and setting
92
+ - The ``LIBCXX_ENABLE_ASSERTIONS `` CMake variable that was used to enable the safe mode has been deprecated and setting
93
93
it triggers an error; use the ``LIBCXX_HARDENING_MODE `` CMake variable with the value ``extensive `` instead. Similarly,
94
94
the ``_LIBCPP_ENABLE_ASSERTIONS `` macro has been deprecated (setting it to ``1 `` still enables the extensive mode in
95
95
the LLVM 19 release while also issuing a deprecation warning). See :ref: `the hardening documentation
Original file line number Diff line number Diff line change 38
38
39
39
// HARDENING {
40
40
41
- // TODO(hardening): deprecate this in LLVM 19.
42
41
// This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
43
- // equivalent to setting the extensive mode.
42
+ // equivalent to setting the extensive mode. This is deprecated and will be removed in LLVM 20.
44
43
# ifdef _LIBCPP_ENABLE_ASSERTIONS
44
+ # warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead"
45
45
# if _LIBCPP_ENABLE_ASSERTIONS != 0 && _LIBCPP_ENABLE_ASSERTIONS != 1
46
46
# error "_LIBCPP_ENABLE_ASSERTIONS must be set to 0 or 1"
47
47
# endif
Original file line number Diff line number Diff line change 19
19
// HWASAN replaces TRAP with abort or error exit code.
20
20
// XFAIL: hwasan
21
21
// Note that GCC doesn't support `-Wno-macro-redefined`.
22
- // ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_ENABLE_ASSERTIONS=1
22
+ // ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_ENABLE_ASSERTIONS=1 -Wno-#warnings -Wno-cpp
23
23
24
24
#include < cassert>
25
25
#include " check_assertion.h"
You can’t perform that action at this time.
0 commit comments