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

Peter Collingbourne peter at pcc.me.uk
Thu Oct 24 17:10:54 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);
----------------
Richard Smith wrote:
> 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.
Agree, done.


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



More information about the cfe-commits mailing list