[PATCH] SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.

Richard Smith richard at metafoo.co.uk
Thu Oct 24 15:23:16 PDT 2013



================
Comment at: lib/Driver/SanitizerArgs.cpp:47-52
@@ +46,8 @@
+
+    // At this point we have not expanded groups, so any unsupported sanitizers
+    // in Add are those which have been explicitly enabled. Diagnose them.
+    Add = filterUnsupportedKinds(TC, Add, Args, *I, /*DiagnoseErrors=*/true);
+    Add = expandGroups(Add);
+    // Silently discard any unsupported sanitizers implicitly enabled through
+    // group expansion.
+    Add = filterUnsupportedKinds(TC, Add, Args, *I, /*DiagnoseErrors=*/false);
----------------
If I say:

  clang -target triple -fsanitize=foo,bar -fno-sanitize=bar

and `bar` is not supported on `triple`, I don't think we should diagnose it.


http://llvm-reviews.chandlerc.com/D1990



More information about the cfe-commits mailing list