[cfe-commits] r65981 - /cfe/trunk/lib/Analysis/RegionStore.cpp
Ted Kremenek
kremenek at apple.com
Tue Mar 3 16:11:38 PST 2009
Author: kremenek
Date: Tue Mar 3 18:11:38 2009
New Revision: 65981
URL: http://llvm.org/viewvc/llvm-project?rev=65981&view=rev
Log:
RegionStore::RemoveDeadBindings needs to check all the symbols of the super region of a scanned region as well.
Modified:
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=65981&r1=65980&r2=65981&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Tue Mar 3 18:11:38 2009
@@ -850,6 +850,26 @@
static void UpdateLiveSymbols(SVal X, SymbolReaper& SymReaper) {
+ if (loc::MemRegionVal *XR = dyn_cast<loc::MemRegionVal>(&X)) {
+ const MemRegion *R = XR->getRegion();
+
+ while (R) {
+ if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R)) {
+ SymReaper.markLive(SR->getSymbol());
+ return;
+ }
+
+ if (const SubRegion *SR = dyn_cast<SubRegion>(R)) {
+ R = SR->getSuperRegion();
+ continue;
+ }
+
+ break;
+ }
+
+ return;
+ }
+
for (SVal::symbol_iterator SI=X.symbol_begin(), SE=X.symbol_end();SI!=SE;++SI)
SymReaper.markLive(*SI);
}
More information about the cfe-commits
mailing list