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.

llvm-svn: 74559
diff --git a/clang/lib/Analysis/Store.cpp b/clang/lib/Analysis/Store.cpp
index 5aa756e..cb09986 100644
--- a/clang/lib/Analysis/Store.cpp
+++ b/clang/lib/Analysis/Store.cpp
@@ -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);
       }
     }