]> granicus.if.org Git - clang/commitdiff
Handle cast of 'ObjCObjectRegion' in StoreManager::InvalidateRegion.
authorTed Kremenek <kremenek@apple.com>
Tue, 14 Jul 2009 23:52:07 +0000 (23:52 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 14 Jul 2009 23:52:07 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75713 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/Store.cpp

index 50d0767f61059059a277b861b5105f25b162de1f..2910f49c80c95d71c9c712424181c921e6272403 100644 (file)
@@ -225,11 +225,15 @@ const GRState *StoreManager::InvalidateRegion(const GRState *state,
   if (!R->isBoundable())
     return state;
 
-  if (isa<AllocaRegion>(R) || isa<SymbolicRegion>(R)) {
+  if (isa<AllocaRegion>(R) || isa<SymbolicRegion>(R) 
+      || isa<ObjCObjectRegion>(R)) {
     // Invalidate the alloca region by setting its default value to 
     // conjured symbol. The type of the symbol is irrelavant.
     SVal V = ValMgr.getConjuredSymbolVal(E, Ctx.IntTy, Count);
     state = setDefaultValue(state, R, V);
+    
+    // FIXME: This form of invalidation is a little bogus; we actually need
+    // to invalidate all subregions as well.
     return state;
   }