diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-21 20:44:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-21 20:44:44 +0000 |
commit | e423ed36f064e0830040c623f2f0a66df1c20814 (patch) | |
tree | 3cbf6deb44b71bae54d1b4028a42b9a477deb6e2 /clang/lib/Basic | |
parent | 1f15fd489eeefedf68641dfa2722d17bc955cdda (diff) | |
download | bcm5719-llvm-e423ed36f064e0830040c623f2f0a66df1c20814.tar.gz bcm5719-llvm-e423ed36f064e0830040c623f2f0a66df1c20814.zip |
Simplify this logic now that -W can't be applied to remarks. No functionality change.
llvm-svn: 216222
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/DiagnosticIDs.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp index ec244ccda3c..cf6e4c29002 100644 --- a/clang/lib/Basic/DiagnosticIDs.cpp +++ b/clang/lib/Basic/DiagnosticIDs.cpp @@ -428,16 +428,9 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, // Upgrade ignored diagnostics if -Weverything is enabled. if (Diag.EnableAllWarnings && Result == diag::Severity::Ignored && - !Mapping.isUser()) + !Mapping.isUser() && getBuiltinDiagClass(DiagID) != CLASS_REMARK) Result = diag::Severity::Warning; - // Diagnostics of class REMARK are either printed as remarks or in case they - // have been added to -Werror they are printed as errors. - // FIXME: Disregarding user-requested remark mappings like this is bogus. - if (Result == diag::Severity::Warning && - getBuiltinDiagClass(DiagID) == CLASS_REMARK) - Result = diag::Severity::Remark; - // Ignore -pedantic diagnostics inside __extension__ blocks. // (The diagnostics controlled by -pedantic are the extension diagnostics // that are not enabled by default.) |