[libcxx-commits] [PATCH] D148736: [libc++] Adjust D_LIBCPP_ENABLE_ASSERTIONS defines in exception_guard tests

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 19 12:58:02 PDT 2023


ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

For the assert.FOO.pass.cpp test, we should be passing _LIBCPP_ENABLE_ASSERTIONS=1
for consistency, even though -D_LIBCPP_ENABLE_ASSERTIONS is equivalent.

For the other test, we shouldn't be forcing assertions to be enabled,
since we already have a CI job that enables assertions by default and
will do the right thing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148736

Files:
  libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
  libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp


Index: libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp
+++ libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions -D_LIBCPP_ENABLE_ASSERTIONS
+// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions
 
 #include <utility>
 
Index: libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
+++ libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
@@ -10,7 +10,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: availability-verbose_abort-missing
-// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions -D_LIBCPP_ENABLE_ASSERTIONS
+// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions -D_LIBCPP_ENABLE_ASSERTIONS=1
 
 // ADDITIONAL_COMPILE_FLAGS: -Wno-private-header
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148736.515051.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230419/a9c6a243/attachment.bin>


More information about the libcxx-commits mailing list