From bf4e419d996bf42e4933cada610d973a0fcc40eb Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 17 Oct 2008 20:49:23 +0000 Subject: [PATCH] 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 --- include/clang/Analysis/PathSensitive/GRCoreEngine.h | 8 ++++++-- lib/Analysis/GRCoreEngine.cpp | 3 +++ 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& 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& 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); } -- 2.40.0