]> granicus.if.org Git - clang/commitdiff
Simplify this logic now that -W can't be applied to remarks. No functionality change.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 21 Aug 2014 20:44:44 +0000 (20:44 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 21 Aug 2014 20:44:44 +0000 (20:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216222 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/DiagnosticIDs.cpp

index ec244ccda3cb9f23189c67cc6f23370b324ea7ce..cf6e4c29002d9e56203a0891ecd637e4503e9533 100644 (file)
@@ -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.)