This revision was automatically updated to reflect the committed changes.
Closed by commit rC342765: [analyzer] [NFC] Dead code removal (authored by 
george.karpenkov, committed by ).
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D52269?vs=166143&id=166546#toc

Repository:
  rC Clang

https://reviews.llvm.org/D52269

Files:
  include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
  include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
  include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  lib/StaticAnalyzer/Core/BugReporter.cpp
  lib/StaticAnalyzer/Core/ExprEngine.cpp

Index: lib/StaticAnalyzer/Core/BugReporter.cpp
===================================================================
--- lib/StaticAnalyzer/Core/BugReporter.cpp
+++ lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2023,8 +2023,6 @@
 
 void BugType::anchor() {}
 
-void BugType::FlushReports(BugReporter &BR) {}
-
 void BuiltinBug::anchor() {}
 
 //===----------------------------------------------------------------------===//
@@ -2253,14 +2251,6 @@
   if (BugTypes.isEmpty())
     return;
 
-  // First flush the warnings for each BugType.  This may end up creating new
-  // warnings and new BugTypes.
-  // FIXME: Only NSErrorChecker needs BugType's FlushReports.
-  // Turn NSErrorChecker into a proper checker and remove this.
-  SmallVector<const BugType *, 16> bugTypes(BugTypes.begin(), BugTypes.end());
-  for (const auto I : bugTypes)
-    const_cast<BugType*>(I)->FlushReports(*this);
-
   // We need to flush reports in deterministic order to ensure the order
   // of the reports is consistent between runs.
   for (const auto EQ : EQClassesVector)
Index: lib/StaticAnalyzer/Core/ExprEngine.cpp
===================================================================
--- lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -189,7 +189,7 @@
                this),
       SymMgr(StateMgr.getSymbolManager()),
       svalBuilder(StateMgr.getSValBuilder()), ObjCNoRet(mgr.getASTContext()),
-      ObjCGCEnabled(gcEnabled), BR(mgr, *this),
+      BR(mgr, *this),
       VisitedCallees(VisitedCalleesIn), HowToInline(HowToInlineIn) {
   unsigned TrimInterval = mgr.options.getGraphTrimInterval();
   if (TrimInterval != 0) {
@@ -3184,11 +3184,6 @@
   if (trim) {
     std::vector<const ExplodedNode *> Src;
 
-    // Flush any outstanding reports to make sure we cover all the nodes.
-    // This does not cause them to get displayed.
-    for (const auto I : BR)
-      const_cast<BugType *>(I)->FlushReports(BR);
-
     // Iterate through the reports and get their nodes.
     for (BugReporter::EQClasses_iterator
            EI = BR.EQClasses_begin(), EE = BR.EQClasses_end(); EI != EE; ++EI) {
Index: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
===================================================================
--- include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -141,9 +141,6 @@
   /// implicitly never returns.
   ObjCNoReturn ObjCNoRet;
 
-  /// Whether or not GC is enabled in this analysis.
-  bool ObjCGCEnabled;
-
   /// The BugReporter associated with this engine.  It is important that
   ///  this object be placed at the very end of member variables so that its
   ///  destructor is called before the rest of the ExprEngine is destroyed.
@@ -201,8 +198,6 @@
     return *currBldrCtx;
   }
 
-  bool isObjCGCEnabled() { return ObjCGCEnabled; }
-
   const Stmt *getStmt() const;
 
   void GenerateAutoTransition(ExplodedNode *N);
Index: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
===================================================================
--- include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
@@ -162,10 +162,6 @@
     return getSValBuilder().getSymbolManager();
   }
 
-  bool isObjCGCEnabled() const {
-    return Eng.isObjCGCEnabled();
-  }
-
   ProgramStateManager &getStateManager() {
     return Eng.getStateManager();
   }
Index: include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
===================================================================
--- include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
+++ include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
@@ -65,8 +65,6 @@
   ///  by a sink node.
   bool isSuppressOnSink() const { return SuppressOnSink; }
   void setSuppressOnSink(bool x) { SuppressOnSink = x; }
-
-  virtual void FlushReports(BugReporter& BR);
 };
 
 class BuiltinBug : public BugType {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to