diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-15 03:17:38 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-15 03:17:38 +0000 |
commit | 25e695b2d574d919cc1bbddf3a2efe073d449b1c (patch) | |
tree | 69abacb15f2f0f6dcce7cc73047b6a07879f944f /lib/Analysis/CFRefCount.cpp | |
parent | bbed6b964414145b29e7b60b3e538093734ea3f8 (diff) |
Extend the ProgramPoint to include the context information LocationContext,
which is either a stack frame context of the function or a local scope
context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 02f427a91e..683be27cb2 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -181,7 +181,8 @@ public: ExplodedNode *MakeNode(const GRState *state, ExplodedNode *Pred) { if (SNB) - return SNB->generateNode(PostStmt(S, tag), state, Pred); + return SNB->generateNode(PostStmt(S, Pred->getLocationContext(), tag), + state, Pred); assert(ENB); return ENB->generateNode(state, Pred); @@ -3203,7 +3204,8 @@ void CFRefCount::EvalReturn(ExplodedNodeSet& Dst, static int ReturnOwnLeakTag = 0; state = state->set<RefBindings>(Sym, X); ExplodedNode *N = - Builder.generateNode(PostStmt(S, &ReturnOwnLeakTag), state, Pred); + Builder.generateNode(PostStmt(S, Pred->getLocationContext(), + &ReturnOwnLeakTag), state, Pred); if (N) { CFRefReport *report = new CFRefLeakReport(*static_cast<CFRefBug*>(leakAtReturn), *this, @@ -3224,8 +3226,9 @@ void CFRefCount::EvalReturn(ExplodedNodeSet& Dst, static int ReturnNotOwnedForOwnedTag = 0; state = state->set<RefBindings>(Sym, X ^ RefVal::ErrorReturnedNotOwned); if (ExplodedNode *N = - Builder.generateNode(PostStmt(S, &ReturnNotOwnedForOwnedTag), - state, Pred)) { + Builder.generateNode(PostStmt(S, Pred->getLocationContext(), + &ReturnNotOwnedForOwnedTag), + state, Pred)) { CFRefReport *report = new CFRefReport(*static_cast<CFRefBug*>(returnNotOwnedForOwned), *this, N, Sym); |