diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-08-18 01:12:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-08-18 01:12:56 +0000 |
commit | 1e473ccb0e0f6fd1954bef330f7193c1a3fb3ba1 (patch) | |
tree | 588f6f971fa5e1761c19fb4787d3bb79609f4f2b /lib/Frontend/Warnings.cpp | |
parent | 1b2d53647dda5e4a70cea54ec3bedbf167081120 (diff) |
Implement '-Weverything', which enables all warnings except those explicitly mapped to be ignored.
Currently this includes -pedantic warnings as well; we'll need to consider whether these should
be included.
This works as expected with -Werror.
Test cases were added to Sema/warn-unused-parameters.c, but they should probably be broken off into
their own test file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/Warnings.cpp')
-rw-r--r-- | lib/Frontend/Warnings.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index 215f8f8b22..d24779e1a9 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -98,6 +98,13 @@ void clang::ProcessWarningOptions(Diagnostic &Diags, Mapping = isPositive ? diag::MAP_ERROR : diag::MAP_WARNING_NO_WERROR; Opt = Specifier; } + + // -Weverything is a special case as well. It implicitly enables all + // warnings, including ones not explicitly in a warning group. + if (Opt == "everything") { + Diags.setEnableAllWarnings(true); + continue; + } // -Wfatal-errors is yet another special case. if (Opt.startswith("fatal-errors")) { |