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
784784config_define_if_not(LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
785785config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
786786
787- # TODO(LLVM 19): Produce a deprecation warning.
788787if (LIBCXX_ENABLE_ASSERTIONS)
788+ message (DEPRECATION "LIBCXX_ENABLE_ASSERTIONS is deprecated and will be removed in LLVM 20. Please use LIBCXX_HARDENING_MODE instead." )
789789 set (LIBCXX_HARDENING_MODE "extensive" )
790790endif ()
791791if (LIBCXX_HARDENING_MODE STREQUAL "none" )
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ Deprecations and Removals
8989 This decision is based on LEWGs discussion on `P3122 <https://wg21.link/P3122> ` and `P3162 <https://wg21.link/P3162> `
9090 to not use ``[[nodiscard]] `` in the standard.
9191
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
9393 it triggers an error; use the ``LIBCXX_HARDENING_MODE `` CMake variable with the value ``extensive `` instead. Similarly,
9494 the ``_LIBCPP_ENABLE_ASSERTIONS `` macro has been deprecated (setting it to ``1 `` still enables the extensive mode in
9595 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 3838
3939// HARDENING {
4040
41- // TODO(hardening): deprecate this in LLVM 19.
4241// 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.
4443# ifdef _LIBCPP_ENABLE_ASSERTIONS
44+ # warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead"
4545# if _LIBCPP_ENABLE_ASSERTIONS != 0 && _LIBCPP_ENABLE_ASSERTIONS != 1
4646# error "_LIBCPP_ENABLE_ASSERTIONS must be set to 0 or 1"
4747# endif
Original file line number Diff line number Diff line change 1919// HWASAN replaces TRAP with abort or error exit code.
2020// XFAIL: hwasan
2121// 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
2323
2424#include < cassert>
2525#include " check_assertion.h"
You can’t perform that action at this time.
0 commit comments