only warnings did this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111355
91177308-0d34-0410-b5e6-
96231b3b80d8
// If a fatal error has already been emitted, silence all subsequent
// diagnostics.
if (FatalErrorOccurred) {
- if (DiagLevel >= Diagnostic::Error) {
+ if (DiagLevel >= Diagnostic::Error && Client->IncludeInDiagnosticCounts()) {
++NumErrors;
++NumErrorsSuppressed;
}
-
+
return false;
}
}
if (DiagLevel >= Diagnostic::Error) {
- ErrorOccurred = true;
- ++NumErrors;
-
+ if (Client->IncludeInDiagnosticCounts()) {
+ ErrorOccurred = true;
+ ++NumErrors;
+ }
+
// If we've emitted a lot of errors, emit a fatal error after it to stop a
// flood of bogus errors.
if (ErrorLimit && NumErrors >= ErrorLimit &&