Hi Folks,

While working on some DiagnosticsEngine code I noticed that the
NumErrorsSuppressed member has not been used since r119766.  Here
is a patch to drop it.  I've tested the patch on several versions
over the last few months, now through r220400.

Thanks,
-Brad

>From a7f4eea5d6b136b7b62d00d5b4259742109cbf1b Mon Sep 17 00:00:00 2001
Message-Id: <a7f4eea5d6b136b7b62d00d5b4259742109cbf1b.1414001449.git.brad.k...@kitware.com>
From: Brad King <[email protected]>
Date: Wed, 22 Oct 2014 14:09:54 -0400
Subject: [PATCH] Remove unused DiagnosticsEngine::NumErrorsSuppressed member

Since r119766 (Remove Diagnostic's get/setNumErrors() and
getNumErrorsSuppressed(), 2010-11-19) this member has been inaccessible
and is not used anywhere.  Drop it.
---
 include/clang/Basic/Diagnostic.h | 1 -
 lib/Basic/Diagnostic.cpp         | 1 -
 lib/Basic/DiagnosticIDs.cpp      | 1 -
 3 files changed, 3 deletions(-)

diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index e47827a..556219c 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -302,7 +302,6 @@ private:
 
   unsigned NumWarnings;         ///< Number of warnings reported
   unsigned NumErrors;           ///< Number of errors reported
-  unsigned NumErrorsSuppressed; ///< Number of errors suppressed
 
   /// \brief A function pointer that converts an opaque diagnostic
   /// argument to a strings.
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 127043d..59a75df 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -101,7 +101,6 @@ void DiagnosticsEngine::Reset() {
   
   NumWarnings = 0;
   NumErrors = 0;
-  NumErrorsSuppressed = 0;
   TrapNumErrorsOccurred = 0;
   TrapNumUnrecoverableErrorsOccurred = 0;
   
diff --git a/lib/Basic/DiagnosticIDs.cpp b/lib/Basic/DiagnosticIDs.cpp
index cf6e4c2..282e75e 100644
--- a/lib/Basic/DiagnosticIDs.cpp
+++ b/lib/Basic/DiagnosticIDs.cpp
@@ -640,7 +640,6 @@ bool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {
     if (DiagLevel >= DiagnosticIDs::Error &&
         Diag.Client->IncludeInDiagnosticCounts()) {
       ++Diag.NumErrors;
-      ++Diag.NumErrorsSuppressed;
     }
 
     return false;
-- 
2.1.1



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to