[libcxx-commits] [libcxx] [libcxx] mark _LIBCPP_VERBOSE_{ABORT, TRAP} `nomerge` (PR #200078)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 28 08:08:03 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions  -- libcxx/include/__cxx03/__verbose_abort libcxx/include/__verbose_abort libcxx/include/__verbose_trap --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__cxx03/__verbose_abort b/libcxx/include/__cxx03/__verbose_abort
index 01da6ba5a..f664f362b 100644
--- a/libcxx/include/__cxx03/__verbose_abort
+++ b/libcxx/include/__cxx03/__verbose_abort
@@ -40,7 +40,11 @@ _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const cha
 #  if !_LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT
 // The decltype is there to suppress -Wunused warnings in this configuration.
 void __use(const char*, ...);
-#    define _LIBCPP_VERBOSE_ABORT(...) ({ decltype(::std::__use(__VA_ARGS__))(); [[clang::__nomerge__]] __builtin_abort(); })
+#    define _LIBCPP_VERBOSE_ABORT(...)                                                                                 \
+      ({                                                                                                               \
+        decltype(::std::__use(__VA_ARGS__))();                                                                         \
+        [[clang::__nomerge__]] __builtin_abort();                                                                      \
+      })
 #  else
 #    define _LIBCPP_VERBOSE_ABORT(...) ({ [[clang::__nomerge__]] ::std::__libcpp_verbose_abort(__VA_ARGS__); })
 #  endif
diff --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort
index 1f95aac79..ead1c3ae4 100644
--- a/libcxx/include/__verbose_abort
+++ b/libcxx/include/__verbose_abort
@@ -42,7 +42,11 @@ _LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
 #  if !_LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT
 // The decltype is there to suppress -Wunused warnings in this configuration.
 void __use(const char*, ...);
-#    define _LIBCPP_VERBOSE_ABORT(...) ({ decltype(::std::__use(__VA_ARGS__))(); [[clang::__nomerge__]] __builtin_abort(); })
+#    define _LIBCPP_VERBOSE_ABORT(...)                                                                                 \
+      ({                                                                                                               \
+        decltype(::std::__use(__VA_ARGS__))();                                                                         \
+        [[clang::__nomerge__]] __builtin_abort();                                                                      \
+      })
 #  else
 #    define _LIBCPP_VERBOSE_ABORT(...) ({ [[clang::__nomerge__]] ::std::__libcpp_verbose_abort(__VA_ARGS__); })
 #  endif
diff --git a/libcxx/include/__verbose_trap b/libcxx/include/__verbose_trap
index 867369afc..8aec573c8 100644
--- a/libcxx/include/__verbose_trap
+++ b/libcxx/include/__verbose_trap
@@ -21,7 +21,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #if __has_builtin(__builtin_verbose_trap)
 #  define _LIBCPP_VERBOSE_TRAP(message) ({ [[clang::__nomerge__]] __builtin_verbose_trap("libc++", message); })
 #else
-#  define _LIBCPP_VERBOSE_TRAP(message) ({ (void)message; [[clang::__nomerge__]] __builtin_trap(); })
+#  define _LIBCPP_VERBOSE_TRAP(message)                                                                                \
+    ({                                                                                                                 \
+      (void)message;                                                                                                   \
+      [[clang::__nomerge__]] __builtin_trap();                                                                         \
+    })
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

``````````

</details>


https://github.com/llvm/llvm-project/pull/200078


More information about the libcxx-commits mailing list