From 1eb68096a21aa10a8e11ebb67c56b6bb4d794129 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 16 Oct 2009 00:30:49 +0000 Subject: retain/release checker: Stop tracking reference counts for any symbols touched by StoreManager::InvalidateRegion(). This fixes and . llvm-svn: 84223 --- clang/lib/Analysis/CFRefCount.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'clang/lib/Analysis/CFRefCount.cpp') 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(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(*I); + } } else { // Nuke all other arguments passed by reference. -- cgit v1.2.3