[clang] [Clang][Driver] Emit warning when -fsanitize-trap=<...> is passed without associated -fsanitize=<...> (PR #147997)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 10 20:29:01 PDT 2025


MaskRay wrote:

The current -fsanitize-trap behavior is intentional. See 
https://discourse.llvm.org/t/clang-gsoc-2025-usability-improvements-for-trapping-undefined-behavior-sanitizer/84568/11

I believe Google actually depended on -fsanitize-trap=undefined not leading to warnings/errors when -fsanitize=undefined is not specified.

https://github.com/llvm/llvm-project/pull/147997


More information about the cfe-commits mailing list