r216222 - Simplify this logic now that -W can't be applied to remarks. No functionality change.
richard-llvm at metafoo.co.uk
Thu Aug 21 13:44:44 PDT 2014
Date: Thu Aug 21 15:44:44 2014
New Revision: 216222
Simplify this logic now that -W can't be applied to remarks. No functionality change.
--- 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() && 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