[cfe-commits] r144670 - /cfe/trunk/lib/Frontend/Warnings.cpp
Chad Rosier
mcrosier at apple.com
Tue Nov 15 10:57:33 PST 2011
Author: mcrosier
Date: Tue Nov 15 12:57:32 2011
New Revision: 144670
URL: http://llvm.org/viewvc/llvm-project?rev=144670&view=rev
Log:
Fix a regression from 143657. The second pass of the warning options should only be emitting
warnings/errors for unknown warning options. getDiagnosticsInGroup returns false if the
diagnostics is found and true otherwise. Thus, if we're reporting and we have a valid
diagnostic, we were actually setting the flag and causing mayhem.
rdar://10444207
Modified:
cfe/trunk/lib/Frontend/Warnings.cpp
Modified: cfe/trunk/lib/Frontend/Warnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Warnings.cpp?rev=144670&r1=144669&r2=144670&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Warnings.cpp (original)
+++ cfe/trunk/lib/Frontend/Warnings.cpp Tue Nov 15 12:57:32 2011
@@ -166,8 +166,9 @@
continue;
}
- if (Report && DiagIDs->getDiagnosticsInGroup(Opt, _Diags)) {
- EmitUnkownDiagWarning(Diags, "-W", Opt, isPositive);
+ if (Report) {
+ if (DiagIDs->getDiagnosticsInGroup(Opt, _Diags))
+ EmitUnkownDiagWarning(Diags, "-W", Opt, isPositive);
} else {
Diags.setDiagnosticGroupMapping(Opt, Mapping);
}
More information about the cfe-commits
mailing list