[cfe-commits] r74559 - /cfe/trunk/lib/Analysis/Store.cpp

Ted Kremenek kremenek at apple.com
Tue Jun 30 15:31:23 PDT 2009


Author: kremenek
Date: Tue Jun 30 17:31:23 2009
New Revision: 74559

URL: http://llvm.org/viewvc/llvm-project?rev=74559&view=rev
Log:
Update old CastRegion logic to not assume that ElementRegion's super region is a
TypedRegion. While we plan on removing this code at some point, it serves as a
good reference implementation for use with BasicStore until we are sure the new
CastRegion logic (in RegionStore.cpp) is correct.

Modified:
    cfe/trunk/lib/Analysis/Store.cpp

Modified: cfe/trunk/lib/Analysis/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Store.cpp?rev=74559&r1=74558&r2=74559&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/Store.cpp (original)
+++ cfe/trunk/lib/Analysis/Store.cpp Tue Jun 30 17:31:23 2009
@@ -88,10 +88,10 @@
         
         // If the super region is an element region, strip it away.
         // FIXME: Is this the right thing to do in all cases?
-        const TypedRegion *Base = isa<ElementRegion>(TR) ?
-                                  cast<TypedRegion>(TR->getSuperRegion()) : TR;
+        const MemRegion *Base = isa<ElementRegion>(TR) ? TR->getSuperRegion()
+                                                       : TR;
         ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base, 
-						   StateMgr.getContext());
+                                                   StateMgr.getContext());
         return CastResult(state, ER);
       }
     }





More information about the cfe-commits mailing list