[libcxx-commits] [libcxx] [libc++][hardening] Add a greppable prefix to assertion messages. (PR #150560)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 29 22:58:52 PDT 2025
================
@@ -20,8 +20,8 @@
#define _LIBCPP_ASSERT(expression, message) \
(__builtin_expect(static_cast<bool>(expression), 1) \
? (void)0 \
- : _LIBCPP_ASSERTION_HANDLER(__FILE__ ":" _LIBCPP_TOSTRING(__LINE__) ": assertion " _LIBCPP_TOSTRING( \
- expression) " failed: " message "\n"))
+ : _LIBCPP_ASSERTION_HANDLER(__FILE__ ":" _LIBCPP_TOSTRING( \
+ __LINE__) ": libc++ Hardening assertion " _LIBCPP_TOSTRING(expression) " failed: " message "\n"))
----------------
var-const wrote:
We don't have a consistent naming convention, unfortunately. Internal macros use the `LIBCPP` prefix like you said, but CMake variables (which are public-facing) use `LIBCXX`, and also the name of the directory within the LLVM repo is `libcxx`.
https://github.com/llvm/llvm-project/pull/150560
More information about the libcxx-commits
mailing list