aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 76ace6d7cc2a..0dafd5f3bdee 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_GR_COREENGINE
-#define LLVM_CLANG_GR_COREENGINE
+#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_COREENGINE_H
+#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_COREENGINE_H
#include "clang/AST/Expr.h"
#include "clang/Analysis/AnalysisContext.h"
@@ -60,7 +60,7 @@ private:
SubEngine& SubEng;
/// G - The simulation graph. Each node is a (location,state) pair.
- std::unique_ptr<ExplodedGraph> G;
+ mutable ExplodedGraph G;
/// WList - A set of queued nodes that need to be processed by the
/// worklist algorithm. It is up to the implementation of WList to decide
@@ -95,6 +95,8 @@ private:
void HandleBranch(const Stmt *Cond, const Stmt *Term, const CFGBlock *B,
ExplodedNode *Pred);
+ void HandleCleanupTemporaryBranch(const CXXBindTemporaryExpr *BTE,
+ const CFGBlock *B, ExplodedNode *Pred);
/// Handle conditional logic for running static initializers.
void HandleStaticInit(const DeclStmt *DS, const CFGBlock *B,
@@ -108,19 +110,12 @@ private:
public:
/// Construct a CoreEngine object to analyze the provided CFG.
- CoreEngine(SubEngine& subengine,
- FunctionSummariesTy *FS)
- : SubEng(subengine), G(new ExplodedGraph()),
- WList(WorkList::makeDFS()),
- BCounterFactory(G->getAllocator()),
- FunctionSummaries(FS){}
+ CoreEngine(SubEngine &subengine, FunctionSummariesTy *FS)
+ : SubEng(subengine), WList(WorkList::makeDFS()),
+ BCounterFactory(G.getAllocator()), FunctionSummaries(FS) {}
/// getGraph - Returns the exploded graph.
- ExplodedGraph& getGraph() { return *G.get(); }
-
- /// takeGraph - Returns the exploded graph. Ownership of the graph is
- /// transferred to the caller.
- ExplodedGraph *takeGraph() { return G.release(); }
+ ExplodedGraph &getGraph() { return G; }
/// ExecuteWorkList - Run the worklist algorithm for a maximum number of
/// steps. Returns true if there is still simulation state on the worklist.