r216222 - Simplify this logic now that -W can't be applied to remarks. No functionality change.
Richard Smith
richard-llvm at metafoo.co.uk
Thu Aug 21 13:44:44 PDT 2014
Author: rsmith
Date: Thu Aug 21 15:44:44 2014
New Revision: 216222
URL: http://llvm.org/viewvc/llvm-project?rev=216222&view=rev
Log:
Simplify this logic now that -W can't be applied to remarks. No functionality change.
Modified:
cfe/trunk/lib/Basic/DiagnosticIDs.cpp
Modified: cfe/trunk/lib/Basic/DiagnosticIDs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/DiagnosticIDs.cpp?rev=216222&r1=216221&r2=216222&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/DiagnosticIDs.cpp (original)
+++ cfe/trunk/lib/Basic/DiagnosticIDs.cpp Thu Aug 21 15:44:44 2014
@@ -428,16 +428,9 @@ DiagnosticIDs::getDiagnosticSeverity(uns
// 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.)
More information about the cfe-commits
mailing list