[libcxx-commits] [PATCH] D143245: [libc++] In tests, use `abort` to terminate upon an error.

Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 10 11:32:20 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8e13ec9eca1f: [libc++] In tests, use `abort` to terminate upon an error. (authored by var-const, committed by varconst <varconsteq at gmail.com>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143245/new/

https://reviews.llvm.org/D143245

Files:
  libcxx/test/support/assert_macros.h


Index: libcxx/test/support/assert_macros.h
===================================================================
--- libcxx/test/support/assert_macros.h
+++ libcxx/test/support/assert_macros.h
@@ -65,7 +65,7 @@
 [[noreturn]] void test_log_error(const char* condition, const char* file, int line, std::string&& message) {
   const char* msg = condition ? "Assertion failure: " : "Unconditional failure:";
   std::fprintf(stderr, "%s%s %s %d\n%s", msg, condition, file, line, message.c_str());
-  exit(EXIT_FAILURE);
+  std::abort();
 }
 
 inline void test_fail(const char* file, int line, std::string&& message) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143245.496569.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230210/0e2a3758/attachment.bin>


More information about the libcxx-commits mailing list