diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-06-30 22:31:23 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-06-30 22:31:23 +0000 |
commit | 19cfa2bde3f5845c22eef2d1b9ee4a0ac9e33f7b (patch) | |
tree | b6e11514476f3c3356c7a4bd176e7b1a7725e4f9 /lib/Analysis/Store.cpp | |
parent | 1bc5bbf39a26d2604884216a511bd51aec1784f6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Store.cpp')
-rw-r--r-- | lib/Analysis/Store.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp index 5aa756e14b..cb099862f0 100644 --- a/lib/Analysis/Store.cpp +++ b/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); } } |