]> granicus.if.org Git - clang/commitdiff
Revert r82939. We can only not special case FieldRegions when the super region has...
authorTed Kremenek <kremenek@apple.com>
Tue, 29 Sep 2009 03:12:50 +0000 (03:12 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 29 Sep 2009 03:12:50 +0000 (03:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83040 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index 5d3fa7292b6f2c015b43bb80f6715bd243a102b1..da04d68dcf04dd70951e278709fe96e236405d96 100644 (file)
@@ -514,21 +514,17 @@ const GRState *RegionStoreManager::InvalidateRegion(const GRState *state,
       continue;
     }
     
+    // FIXME: Special case FieldRegion/ElementRegion for more
+    // efficient invalidation.  We don't need to conjure symbols for
+    // these regions in all cases.
+    
     // Get the old binding.  Is it a region?  If so, add it to the worklist.
     if (const SVal *OldV = B.lookup(R)) {
       if (const MemRegion *RV = OldV->getAsRegion())
         WorkList.push_back(RV);
     }
     
-    if (isa<FieldRegion>(R) || isa<ElementRegion>(R) || isa<ObjCIvarRegion>(R)){
-      // For fields and elements, only remove the old binding.  The super
-      // region will get set with a default value from which we can lazily
-      // derive a new symbolic value.
-      B = RBFactory.Remove(B, R);
-      continue;
-    }
-    
-    // Invalidate the binding by conjuring a new symbol.
+    // Invalidate the binding.
     DefinedOrUnknownSVal V = ValMgr.getConjuredSymbolVal(R, Ex, T, Count);
     assert(SymbolManager::canSymbolicate(T) || V.isUnknown());
     B = RBFactory.Add(B, R, V);