[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 16:21:01 PDT 2018


rsmith added a comment.

I'm not at all convinced that this is a good thing. There isn't such a thing as "undefined behavior sanitizer". Rather, there are a whole bunch of different checks that fall under the same umbrella. This test seems on the surface to be about as meaningless as `__has_feature(warnings)` would be: it's useless to ask the question without knowing *which* warnings you're talking about. But perhaps there's some use case I've overlooked (and your description of the patch doesn't mention why you want this). What is the use case you're trying to address with this change?

If we want to change this, you'll also need to update `getPPTransparentSanitizers` to exclude all the UBSan checks, because it's no longer the case that those sanitizers only affect code generation.


Repository:
  rL LLVM

https://reviews.llvm.org/D52386





More information about the cfe-commits mailing list