[PATCH] SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.
Alexey Samsonov
samsonov at google.com
Fri Oct 25 09:00:30 PDT 2013
The change looks good to me.
================
Comment at: lib/Driver/SanitizerArgs.cpp:53
@@ -44,1 +52,3 @@
(*I)->claim();
+
+ AllAdd |= expandGroups(Add);
----------------
Please less blank lines here
================
Comment at: lib/Driver/SanitizerArgs.cpp:272
@@ +271,3 @@
+ bool IsX86_64 = TC.getTriple().getArch() == llvm::Triple::x86_64;
+
+ if (!(IsLinux && IsX86_64)) {
----------------
ditto
================
Comment at: lib/Driver/SanitizerArgs.cpp:132-135
@@ -109,6 +131,6 @@
// command line).
- if ((Kind & AddressFull) != 0 && (AllKinds & Address) == 0)
+ if ((Kind & AddressFull) != 0 && (AllAdd & Address) == 0)
D.Diag(diag::warn_drv_unused_sanitizer)
<< lastArgumentForKind(D, Args, AddressFull)
<< "-fsanitize=address";
----------------
Peter Collingbourne wrote:
> Richard Smith wrote:
> > This looks a bit strange. We won't diagnose
> >
> > -fsanitize=address -fno-sanitize=address -fsanitize=init-order
> >
> > Following the principle of later arguments overriding earlier ones, I would have expected a diagnostic for that, but not for:
> >
> > -fsanitize=address -fsanitize=init-order -fno-sanitize=address
> >
> > Seems to be a pre-existing oddness, though.
> *shrug* I'll let Alexey comment on this, as he introduced this behavior in r173670.
Yes, that one is tricky :( I planned to remove this code together with -fsanitize=init-order option, so I'd rather not heavily modify it.
http://llvm-reviews.chandlerc.com/D1990
More information about the cfe-commits
mailing list