diff options
author | Filipe Cabecinhas <me@filcab.net> | 2015-07-18 06:35:24 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2015-07-18 06:35:24 +0000 |
commit | 136f35e1cbd54e5fb12e5b6cd2445d8307232449 (patch) | |
tree | d9f5ca5cd70843394ebb7fa4f2ba06077ebb11c0 /clang/lib | |
parent | 9f2bf1aff5b7a72cd9b0728d479f1608a405975f (diff) | |
download | bcm5719-llvm-136f35e1cbd54e5fb12e5b6cd2445d8307232449.tar.gz bcm5719-llvm-136f35e1cbd54e5fb12e5b6cd2445d8307232449.zip |
Silence the driver warnings, if we see "-w" on the Driver.
Summary:
We can enable warnings after that -w, so the patch might not be 100%
correct.
The problem that triggered this is: we have some amount of tests that
expect 0 warnings (including unit tests for -w), but -w ends up not fully
silencing everything.
Reviewers: echristo, chandlerc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11322
llvm-svn: 242606
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index d7a5ee9139a..455e492d832 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -387,6 +387,9 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) { InputArgList Args = ParseArgStrings(ArgList.slice(1)); + // Silence driver warnings if requested + Diags.setIgnoreAllWarnings(Args.hasArg(options::OPT_w)); + // -no-canonical-prefixes is used very early in main. Args.ClaimAllArgs(options::OPT_no_canonical_prefixes); |