[libcxx-commits] [libcxx] [libc++][hardening] Add a greppable prefix to assertion messages. (PR #150560)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 25 01:40:49 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"))
----------------
philnik777 wrote:
Do we intend for `_LIBCPP_ASSERT` to only ever be used for hardening?
https://github.com/llvm/llvm-project/pull/150560
More information about the libcxx-commits
mailing list