diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-03-09 09:15:51 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-03-09 09:15:51 +0000 |
commit | 1038f9f69978ea99efccdda01f66215a1c56dc55 (patch) | |
tree | 2478b1ec09e8096bbbbbe8739b1ad8cfa2dc2f13 /lib/Analysis/RegionStore.cpp | |
parent | 3e87209798bcc3fe39254c1b700b0c8251623b98 (diff) |
Now we do not retrieve untyped regions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 9ef3fe8463..433b05d996 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -665,7 +665,8 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) { // FIXME: Perhaps this method should just take a 'const MemRegion*' argument // instead of 'Loc', and have the other Loc cases handled at a higher level. - const MemRegion* R = cast<loc::MemRegionVal>(L).getRegion(); + const TypedRegion* R + = cast<TypedRegion>(cast<loc::MemRegionVal>(L).getRegion()); assert(R && "bad region"); // FIXME: We should eventually handle funny addressing. e.g.: @@ -677,14 +678,12 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) { // // Such funny addressing will occur due to layering of regions. - if (const TypedRegion* TR = dyn_cast<TypedRegion>(R)) { - QualType T =TR->getRValueType(getContext()); - if (T->isStructureType()) - return RetrieveStruct(St, TR); - // FIXME: handle Vector types. - if (T->isVectorType()) + QualType RTy = R->getRValueType(getContext()); + if (RTy->isStructureType()) + return RetrieveStruct(St, R); + // FIXME: handle Vector types. + if (RTy->isVectorType()) return UnknownVal(); - } RegionBindingsTy B = GetRegionBindings(St->getStore()); RegionBindingsTy::data_type* V = B.lookup(R); |