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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144670
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
}