[cfe-commits] [PATCH] Clang support for sanitizer blacklists.

Richard Smith richard at metafoo.co.uk
Sat Dec 1 01:41:13 PST 2012



================
Comment at: include/clang/Driver/Options.td:397-398
@@ +396,4 @@
+                          HelpText<"Path to blacklist file for sanitizers">;
+def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">,
+                             Group<f_clang_Group>, Flags<[CC1Option]>,
+                             HelpText<"Don't use blacklist file for sanitizers">;
----------------
I think this doesn't need to be a CC1Option.

================
Comment at: test/Driver/fsanitize-blacklist.c:2-3
@@ +1,4 @@
+// General blacklist usage.
+// RUN: %clang -fsanitize=address -fsanitize-blacklist=%s %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BLACKLIST
+// CHECK-BLACKLIST: -fsanitize-blacklist
+
----------------
It'd be good to have a simple test that the flag is being correctly passed to the ASan pass (maybe just CHECK-NOT: asan in the generated IR?)

================
Comment at: lib/Driver/Tools.cpp:1485
@@ +1484,3 @@
+
+  // Parse -f(no)sanitize-blacklist options.
+  if (Arg *BLArg = Args.getLastArg(options::OPT_fsanitize_blacklist,
----------------
-f(no-)sanitize-blacklist? :)


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

BRANCH
  svn

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list