diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-09 01:50:57 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-09 01:50:57 +0000 |
commit | 6b62ec90d498eb512f2e231547b05d485814a146 (patch) | |
tree | bbe05f01af9f3f8e989c9d9d356cfaabd759a61f /lib/Analysis/CFRefCount.cpp | |
parent | c1c739bd4b7b2d6d8eca62579e2b18ac0261be08 (diff) |
It lives! The retain/release checker now tracks objects that are sent
'autorelease'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 0e4d660f35..a9ef5cf3fc 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -175,8 +175,7 @@ public: ExplodedNode<GRState> *MakeNode(const GRState *state, ExplodedNode<GRState> *Pred) { if (SNB) - return SNB->generateNode(PostStmt(S, tag), state, - Pred); + return SNB->generateNode(PostStmt(S, tag), state, Pred); assert(ENB); return ENB->generateNode(state, Pred); @@ -3111,6 +3110,7 @@ GRStateRef CFRefCount::Update(GRStateRef state, SymbolRef sym, // Update the autorelease counts. state = SendAutorelease(state, ARCountFactory, sym); V = V.autorelease(); + break; case StopTracking: return state.remove<RefBindings>(sym); @@ -3245,7 +3245,7 @@ CFRefCount::ProcessLeaks(GRStateRef state, return Pred; // Generate an intermediate node representing the leak point. - ExplodedNode<GRState> *N = Builder.MakeNode(state, Pred); + ExplodedNode<GRState> *N = Builder.MakeNode(state, Pred); if (N) { for (llvm::SmallVectorImpl<SymbolRef>::iterator @@ -3354,7 +3354,8 @@ void CFRefCount::ProcessNonLeakError(ExplodedNodeSet<GRState>& Dst, Builder.BuildSinks = true; GRExprEngine::NodeTy* N = Builder.MakeNode(Dst, NodeExpr, Pred, St); - if (!N) return; + if (!N) + return; CFRefBug *BT = 0; |