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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242606
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
// RUN: c-index-test -test-load-source-reparse 5 all -Wno-return-type %s 2>&1|FileCheck -check-prefix=CHECK-SECOND-WARNING %s
// RUN: c-index-test -test-load-source all -w %s 2>&1|not grep warning:
// RUN: c-index-test -test-load-source-reparse 5 all -w %s 2>&1|not grep warning:
+// RUN: c-index-test -test-load-source all -w -O4 %s 2>&1|not grep warning:
// CHECK-BOTH-WARNINGS: warning: control reaches end of non-void function
// CHECK-BOTH-WARNINGS: warning: incompatible pointer types returning 'float *' from a function with result type 'int *'