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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits