DiagnosticConsumer does not want it in diagnostic count MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_03827ede3fc1fa8386d75ae5c73ea79b"
--b1_03827ede3fc1fa8386d75ae5c73ea79b Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit (Not sure if I can comment on a closed code review) Any reason this doesn't have a test case (so far as I can see anyway)? From: Daniel Jasper Sent: 9/28/2012 12:21 PM To: [email protected]; [email protected]; [email protected] Cc: [email protected] Subject: [cfe-commits] [PATCH] Set Diag.ErrorOccurred even if a DiagnosticConsumer does not want it in diagnostic count Hi rsmith, doug.gregor, 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). http://llvm-reviews.chandlerc.com/D53 Files: lib/Basic/DiagnosticIDs.cpp Index: lib/Basic/DiagnosticIDs.cpp =================================================================== --- lib/Basic/DiagnosticIDs.cpp +++ lib/Basic/DiagnosticIDs.cpp @@ -628,9 +628,9 @@ 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 @@ unsigned cat = getCategoryNumberForDiag(DiagID); return DiagnosticIDs::getCategoryNameFromID(cat).startswith("ARC "); } - --b1_03827ede3fc1fa8386d75ae5c73ea79b Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits --b1_03827ede3fc1fa8386d75ae5c73ea79b-- _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
