diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-08-18 06:46:41 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-08-18 06:46:41 +0000 |
commit | 7a5bf5fb01c676809efcf63de322a88819115652 (patch) | |
tree | b8f79b8e6eb6780225576744484201bf76a1732c /lib/Basic/Diagnostic.cpp | |
parent | 9076014aa3750c8583490d9274a8f814642affaa (diff) |
Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 1e911ec802..d4c7aa9521 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -576,11 +576,11 @@ bool Diagnostic::ProcessDiag() { // 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; } @@ -601,9 +601,11 @@ bool Diagnostic::ProcessDiag() { } 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 && |