forked from OSchip/llvm-project
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 llvm-svn: 144670
This commit is contained in:
parent
cc675f410e
commit
e35f9ddb4c
|
@ -166,8 +166,9 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags,
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue