From: Richard Smith Date: Thu, 21 Aug 2014 20:44:44 +0000 (+0000) Subject: Simplify this logic now that -W can't be applied to remarks. No functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10c57ceeed0b2488a24473f1ae7649033dd6eb39;p=clang Simplify this logic now that -W can't be applied to remarks. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216222 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/DiagnosticIDs.cpp b/lib/Basic/DiagnosticIDs.cpp index ec244ccda3..cf6e4c2900 100644 --- a/lib/Basic/DiagnosticIDs.cpp +++ b/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.)