diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-10-16 00:30:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-10-16 00:30:49 +0000 |
commit | 1eb68096a21aa10a8e11ebb67c56b6bb4d794129 (patch) | |
tree | b6a620a6184a41d52f570dc79595ded739478efd /clang/lib/Analysis/CFRefCount.cpp | |
parent | c5b8225285fb47be39fe0af7f3339844e39f2d35 (diff) | |
download | bcm5719-llvm-1eb68096a21aa10a8e11ebb67c56b6bb4d794129.tar.gz bcm5719-llvm-1eb68096a21aa10a8e11ebb67c56b6bb4d794129.zip |
retain/release checker: Stop tracking reference counts for any symbols touched by StoreManager::InvalidateRegion().
This fixes <rdar://problem/7257223> and <rdar://problem/7283470>.
llvm-svn: 84223
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 49cd4151a6a..2f6425c0c74 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -2859,14 +2859,13 @@ void CFRefCount::EvalSummary(ExplodedNodeSet& Dst, // FIXME: What about layers of ElementRegions? } - // Is the invalidated variable something that we were tracking? - SymbolRef Sym = state->getSValAsScalarOrLoc(R).getAsLocSymbol(); - - // Remove any existing reference-count binding. - if (Sym) - state = state->remove<RefBindings>(Sym); - - state = StoreMgr.InvalidateRegion(state, R, *I, Count); + StoreManager::InvalidatedSymbols IS; + state = StoreMgr.InvalidateRegion(state, R, *I, Count, &IS); + for (StoreManager::InvalidatedSymbols::iterator I = IS.begin(), + E = IS.end(); I!=E; ++I) { + // Remove any existing reference-count binding. + state = state->remove<RefBindings>(*I); + } } else { // Nuke all other arguments passed by reference. |