aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 0a31bc8f5d..536e14944b 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -233,6 +233,9 @@ SVal RegionStoreManager::Retrieve(Store S, Loc L, QualType T) {
}
Store RegionStoreManager::Bind(Store store, Loc LV, SVal V) {
+ if (LV.getSubKind() == loc::SymbolValKind)
+ return store;
+
assert(LV.getSubKind() == loc::MemRegionKind);
const MemRegion* R = cast<loc::MemRegionVal>(LV).getRegion();
@@ -373,7 +376,8 @@ Store RegionStoreManager::InitializeArrayToUndefined(Store store, QualType T,
Store RegionStoreManager::InitializeStructToUndefined(Store store, QualType T,
MemRegion* BaseR) {
- const RecordType* RT = cast<RecordType>(T.getTypePtr());
+ QualType CT = T->getCanonicalTypeInternal();
+ const RecordType* RT = cast<RecordType>(CT.getTypePtr());
RecordDecl* RD = RT->getDecl();
assert(RD->isDefinition());