[clang] Add fine-grained `__has_feature()` cutout (PR #170822)

Florian Mayer via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 6 13:00:21 PST 2026


================
@@ -2421,6 +2404,14 @@ def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
                             "or suspicious behavior. See user manual for available checks">;
 def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
                       Visibility<[ClangOption, CLOption]>;
+def fsanitize_ignore_for_ubsan_feature_EQ
+    : CommaJoined<["-"], "fsanitize-ignore-for-ubsan-feature=">,
----------------
fmayer wrote:

Because we want to be able to say which features do not count as UBSan enabled.

So we can say: "we do not consider array-bounds a sanitizer", and then when we _only_ enable that, the UBSan macro is not set.

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


More information about the cfe-commits mailing list