aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-17 20:49:23 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-17 20:49:23 +0000
commitbf4e419d996bf42e4933cada610d973a0fcc40eb (patch)
tree0ccebebd40dc073776f5907f0f3129219db626c0
parent63ffb78cf4bd0aa8fa149740637cea6c1e08b969 (diff)
Fixed an elusive caching bug in ExplodedGraph construction when a PostStmtKind was used instead of a PostStoreKind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57719 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathSensitive/GRCoreEngine.h8
-rw-r--r--lib/Analysis/GRCoreEngine.cpp3
2 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
index 74311249b3..1dd19efb4c 100644
--- a/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
@@ -235,8 +235,12 @@ public:
}
NodeTy* MakeNode(ExplodedNodeSet<StateTy>& Dst, Stmt* S,
- NodeTy* Pred, const StateTy* St,
- ProgramPoint::Kind K = ProgramPoint::PostStmtKind) {
+ NodeTy* Pred, const StateTy* St) {
+ return MakeNode(Dst, S, Pred, St, PointKind);
+ }
+
+ NodeTy* MakeNode(ExplodedNodeSet<StateTy>& Dst, Stmt* S,
+ NodeTy* Pred, const StateTy* St, ProgramPoint::Kind K) {
const StateTy* PredState = GetState(Pred);
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp
index 84a8d5522d..99e2a7f06e 100644
--- a/lib/Analysis/GRCoreEngine.cpp
+++ b/lib/Analysis/GRCoreEngine.cpp
@@ -318,6 +318,9 @@ static inline ProgramPoint GetPostLoc(Stmt* S, ProgramPoint::Kind K) {
case ProgramPoint::PostLoadKind:
return PostLoad(S);
+ case ProgramPoint::PostStoreKind:
+ return PostStore(S);
+
case ProgramPoint::PostPurgeDeadSymbolsKind:
return PostPurgeDeadSymbols(S);
}