[libcxx-commits] [libcxx] [libc++] Handle Clang function effect analysis in hardening assertions (PR #177447)
Doug Wyatt via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 22 17:07:08 PST 2026
================
@@ -17,11 +17,17 @@
# pragma GCC system_header
#endif
+// Note that we disable -Wfunction-effects inside _LIBCPP_ASSERT when the assertion fails since
+// function effect attributes don't provide any guarantees once a function is determined to be
----------------
dougsonos wrote:
I will open a PR to refine the function effect documentation, to reflect what we're agreeing on here, that function effect analysis and diagnostics are inapplicable to assertion handlers etc. (There's some precedent in that called functions declared both `noexcept` and `noreturn`, like `__libcpp_verbose_abort` are not diagnosed as unsafe.)
https://github.com/llvm/llvm-project/pull/177447
More information about the libcxx-commits
mailing list