aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-22 21:40:46 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-22 21:40:46 +0000
commite01ac5712a94279db2404134817fe6bbf16c1f7c (patch)
treedd553d02d39fa6bc99681e828a1854f1068357ed
parentcdd4f1783da7c7565be2376d14ca6ab2625aa4b6 (diff)
Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76792 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathSensitive/GRCoreEngine.h3
-rw-r--r--lib/Analysis/GRCoreEngine.cpp7
2 files changed, 7 insertions, 3 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
index 0285ad6989..3d8b0ea18e 100644
--- a/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
@@ -142,7 +142,8 @@ public:
}
ExplodedNodeImpl*
- generateNodeImpl(PostStmt PP, const void* State, ExplodedNodeImpl* Pred);
+ generateNodeImpl(const ProgramPoint &PP, const void* State,
+ ExplodedNodeImpl* Pred);
ExplodedNodeImpl*
generateNodeImpl(Stmt* S, const void* State, ExplodedNodeImpl* Pred,
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp
index 5641baac5f..5a45ad2ce4 100644
--- a/lib/Analysis/GRCoreEngine.cpp
+++ b/lib/Analysis/GRCoreEngine.cpp
@@ -430,11 +430,14 @@ GRStmtNodeBuilderImpl::generateNodeImpl(Stmt* S, const void* State,
ExplodedNodeImpl* Pred,
ProgramPoint::Kind K,
const void *tag) {
- return generateNodeImpl(GetPostLoc(S, K, tag), State, Pred);
+ return K == ProgramPoint::PreStmtKind
+ ? generateNodeImpl(PreStmt(S, tag), State, Pred)
+ : generateNodeImpl(GetPostLoc(S, K, tag), State, Pred);
}
ExplodedNodeImpl*
-GRStmtNodeBuilderImpl::generateNodeImpl(PostStmt Loc, const void* State,
+GRStmtNodeBuilderImpl::generateNodeImpl(const ProgramPoint &Loc,
+ const void* State,
ExplodedNodeImpl* Pred) {
bool IsNew;
ExplodedNodeImpl* N = Eng.G->getNodeImpl(Loc, State, &IsNew);