diff options
author | Daniel Jasper <djasper@google.com> | 2012-09-28 15:45:07 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-09-28 15:45:07 +0000 |
commit | d2e6f65b1b068408d0be6740c161dec2f27f8084 (patch) | |
tree | dbfa05d1a43e80473c6c702355b9aa43a33b934d /clang/lib/Basic/DiagnosticIDs.cpp | |
parent | c7d6a2df389d4850d59d9c62ec058caee5b09727 (diff) | |
download | bcm5719-llvm-d2e6f65b1b068408d0be6740c161dec2f27f8084.tar.gz bcm5719-llvm-d2e6f65b1b068408d0be6740c161dec2f27f8084.zip |
Set Diag.ErrorOccurred even if a DiagnosticConsumer does not want it in
diagnostic count.
If a DiagnosticConsumer sub-class overwrites IncludeInDiagnosticCounts,
this should change diagnostic counts. However, it currently also
influences Diag.ErrorOccurred, which in turn influences the behavior of
parsing and semantic analysis (in a way that can make it crash).
llvm-svn: 164824
Diffstat (limited to 'clang/lib/Basic/DiagnosticIDs.cpp')
-rw-r--r-- | clang/lib/Basic/DiagnosticIDs.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp index ca96fd2b9b2..ed976436e28 100644 --- a/clang/lib/Basic/DiagnosticIDs.cpp +++ b/clang/lib/Basic/DiagnosticIDs.cpp @@ -628,9 +628,9 @@ bool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const { if (DiagLevel >= DiagnosticIDs::Error) { if (isUnrecoverable(DiagID)) Diag.UnrecoverableErrorOccurred = true; - + + Diag.ErrorOccurred = true; if (Diag.Client->IncludeInDiagnosticCounts()) { - Diag.ErrorOccurred = true; ++Diag.NumErrors; } @@ -686,4 +686,3 @@ bool DiagnosticIDs::isARCDiagnostic(unsigned DiagID) { unsigned cat = getCategoryNumberForDiag(DiagID); return DiagnosticIDs::getCategoryNameFromID(cat).startswith("ARC "); } - |