[cfe-commits] r142450 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp lib/StaticAnalyzer/Core/ExprEngine.cpp

Anna Zaks ganna at apple.com
Tue Oct 18 16:06:29 PDT 2011


Author: zaks
Date: Tue Oct 18 18:06:29 2011
New Revision: 142450

URL: http://llvm.org/viewvc/llvm-project?rev=142450&view=rev
Log:
[analyzer] Remove dead code.
ExprEngineBuilders is not used.

Removed:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Removed: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h?rev=142449&view=auto
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h (removed)
@@ -1,80 +0,0 @@
-//===-- ExprEngineBuilders.h - "Builder" classes for ExprEngine ---*- C++ -*-=//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines smart builder "references" which are used to marshal
-//  builders between ExprEngine objects and their related components.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_GR_EXPRENGINE_BUILDERS
-#define LLVM_CLANG_GR_EXPRENGINE_BUILDERS
-#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
-#include "clang/Analysis/Support/SaveAndRestore.h"
-
-namespace clang {
-
-namespace ento {
-
-class StmtNodeBuilderRef {
-  ExplodedNodeSet &Dst;
-  StmtNodeBuilder &B;
-  ExprEngine& Eng;
-  ExplodedNode *Pred;
-  const ProgramState *state;
-  const Stmt *stmt;
-  const unsigned OldSize;
-  const bool AutoCreateNode;
-  SaveAndRestore<bool> OldSink;
-  SaveOr OldHasGen;
-
-private:
-  friend class ExprEngine;
-
-  StmtNodeBuilderRef(); // do not implement
-  void operator=(const StmtNodeBuilderRef&); // do not implement
-
-  StmtNodeBuilderRef(ExplodedNodeSet &dst,
-                       StmtNodeBuilder &builder,
-                       ExprEngine& eng,
-                       ExplodedNode *pred,
-                       const ProgramState *st,
-                       const Stmt *s, bool auto_create_node)
-  : Dst(dst), B(builder), Eng(eng), Pred(pred),
-    state(st), stmt(s), OldSize(Dst.size()), AutoCreateNode(auto_create_node),
-    OldSink(B.BuildSinks), OldHasGen(B.hasGeneratedNode) {}
-
-public:
-
-  ~StmtNodeBuilderRef() {
-    // Handle the case where no nodes where generated.  Auto-generate that
-    // contains the updated state if we aren't generating sinks.
-    if (!B.BuildSinks && Dst.size() == OldSize && !B.hasGeneratedNode) {
-      if (AutoCreateNode)
-        B.MakeNode(Dst, const_cast<Stmt*>(stmt), Pred, state);
-      else
-        Dst.Add(Pred);
-    }
-  }
-
-  const ProgramState *getState() { return state; }
-
-  ProgramStateManager& getStateManager() {
-    return Eng.getStateManager();
-  }
-
-  ExplodedNode *MakeNode(const ProgramState *state) {
-    return B.MakeNode(Dst, const_cast<Stmt*>(stmt), Pred, state);
-  }
-};
-
-} // end GR namespace
-
-} // end clang namespace
-
-#endif

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp?rev=142450&r1=142449&r2=142450&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Tue Oct 18 18:06:29 2011
@@ -23,7 +23,6 @@
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
-#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h"

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=142450&r1=142449&r2=142450&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Tue Oct 18 18:06:29 2011
@@ -13,11 +13,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Analysis/Support/SaveAndRestore.h"
 #include "clang/StaticAnalyzer/Core/CheckerManager.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
-#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h"
 #include "clang/AST/CharUnits.h"
 #include "clang/AST/ParentMap.h"





More information about the cfe-commits mailing list