[libcxx-commits] [libcxx] [libc++][hardening] Always enable all checks during constant evaluation (PR #107713)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 12 16:58:36 PDT 2024
var-const wrote:
What is the motivation for this change? The main purpose of hardening is to eliminate undefined behavior, especially "harmful" undefined behavior. IIRC, theoretically there is no (language-level) undefined behavior in constant expression. In practice, the compiler might have some omissions in its checks, and it also won't check for certain library undefined behavior, but in general the usefulness of hardening during constant evaluation seems much less compared to runtime. Do you have any particular cases in mind where enabling a hardening check in a constant expression significantly improves the user experience?
https://github.com/llvm/llvm-project/pull/107713
More information about the libcxx-commits
mailing list