diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-27 06:15:43 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-27 06:15:43 +0000 |
commit | 11583c757bac6ce5c342f2eb572055dd2619a657 (patch) | |
tree | e7522cac1ca56be8a9a829aa31f6de00618d94c0 /lib/Frontend/Warnings.cpp | |
parent | 97a9cf3b99486c7e8c128fce7e230e31bc7ba7c9 (diff) |
Due to a bug, -Wno-everything works like -Weverything. Fix the bug by having
-Wno-everything remap all warnings to ignored.
We can now use "-Wno-everything -W<warning>" to ignore all warnings except
specific ones.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/Warnings.cpp')
-rw-r--r-- | lib/Frontend/Warnings.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index 576dd3d445..f68e03b0d5 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -110,8 +110,14 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, // -Weverything is a special case as well. It implicitly enables all // warnings, including ones not explicitly in a warning group. if (Opt == "everything") { - if (SetDiagnostic) - Diags.setEnableAllWarnings(true); + if (SetDiagnostic) { + if (isPositive) { + Diags.setEnableAllWarnings(true); + } else { + Diags.setEnableAllWarnings(false); + Diags.setMappingToAllDiagnostics(diag::MAP_IGNORE); + } + } continue; } |