diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-18 23:06:29 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-18 23:06:29 +0000 |
commit | 67d9fbac82922ef5b6c9ba5ac4a07e80f9960292 (patch) | |
tree | bca38b9968ea27e2dd8d92dcbd1154bef8d4a17f | |
parent | 9a1e3ab97c48a0381cce449b833c56997048a6d1 (diff) | |
download | clang-67d9fbac82922ef5b6c9ba5ac4a07e80f9960292.tar.gz |
[analyzer] Remove dead code.
ExprEngineBuilders is not used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142450 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h | 80 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
3 files changed, 1 insertions, 82 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h deleted file mode 100644 index 89b47dc6ec..0000000000 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h +++ /dev/null @@ -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 diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index be7ce384e7..fcf0af9ba4 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -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" diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 70142c8fc1..2cce0414c9 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -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" |