[libcxx-commits] [libcxx] [libcxxabi] [libc++][hardening] Implement support for assertion semantics. (PR #148172)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 11 12:23:25 PDT 2025
================
@@ -147,6 +147,36 @@ _LIBCPP_HARDENING_MODE_EXTENSIVE, \
_LIBCPP_HARDENING_MODE_DEBUG
# endif
+// Hardening assertion semantics mirror the evaluation semantics of P3100 Contracts:
+// - `ignore` does not evaluate the assertion;
----------------
ldionne wrote:
I think that is incorrect. We do evaluate the assertion, but then we do nothing with that. Let's make this documentation accurate.
That being said, let's also file a Github issue to later go back and fix this: we should mirror what the actual C++26 contracts do, and not evaluate the assertion. Since that's going to require a rework of our assertion machinery, let's not do that right now.
https://github.com/llvm/llvm-project/pull/148172
More information about the libcxx-commits
mailing list