delcypher wrote: @MaskRay So this is actually part of [my GSoc proposal](https://discourse.llvm.org/t/clang-gsoc-2025-usability-improvements-for-trapping-undefined-behavior-sanitizer/84568/15?u=dan_liew). There's an explanation in the discord post about why I believe it's the wrong behavior. I think your case use case is perfectly valid but the design is also a footgun because it makes it really to have no UBSan checks at all without Clang mentioning it. I believe the way this should work is by default there should be a warning if `-fsanitize-trap=` is used without `-fsanitize=`. If this really is the intended behavior a project wants then project can just disable the warning globally in exactly the same place they are passing `-fsanitize-trap=` globally.
Given that there seems to be some disagreement about this I think it's best I put up an RFC about this and remove it from the GSoC proposal if a consensus isn't reached by the time the project starts. @clingfei > (clang has diagnostic mechanism; littering with "Warning:" is not right). Just for clarity because it really isn't clear. What @MaskRay means is that Clang has a proper diagnostic mechanism which should be used instead of `llvm::errs()` for emitting diagnostics from inside Clang. https://github.com/llvm/llvm-project/pull/132319 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits