summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/Store.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-06-30 22:31:23 +0000
committerTed Kremenek <kremenek@apple.com>2009-06-30 22:31:23 +0000
commitaff66a8a19d9430aa2459dfcf731ea00565d433a (patch)
tree471151be75b6738cf97d4d91358430ccff3893e9 /clang/lib/Analysis/Store.cpp
parent58d8190417220fff27f09845583cda7757b437f9 (diff)
downloadbcm5719-llvm-aff66a8a19d9430aa2459dfcf731ea00565d433a.tar.gz
bcm5719-llvm-aff66a8a19d9430aa2459dfcf731ea00565d433a.zip
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
Diffstat (limited to 'clang/lib/Analysis/Store.cpp')
-rw-r--r--clang/lib/Analysis/Store.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/Store.cpp b/clang/lib/Analysis/Store.cpp
index 5aa756e14be..cb099862f05 100644
--- a/clang/lib/Analysis/Store.cpp
+++ b/clang/lib/Analysis/Store.cpp
@@ -88,10 +88,10 @@ StoreManager::CastRegion(const GRState* state, const MemRegion* R,
// 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);
}
}
OpenPOWER on IntegriCloud