[clang] [clang] Emitting a warning if optimizations are enabled with sanitizers (PR #95934)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 08:49:51 PDT 2024
https://github.com/AaronBallman commented:
I'm not certain we should issue a diagnostic when optimizations are enabled with sanitizers. For example, there is [explicit documentation that users *should* use `-O1` with address sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer#using-addresssanitizer) and [similarly, users should use `-O2` with the thread sanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual#usage).
So perhaps this is a matter that's better handled with documentation so we can explain the tradeoffs to users?
https://github.com/llvm/llvm-project/pull/95934
More information about the cfe-commits
mailing list