aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-22 21:19:14 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-22 21:19:14 +0000
commitcf54959eae25fb3050f41833f0eab91042fb1269 (patch)
treeaf4c0ebbde3ecd9892d8350ea3f401418c839277 /lib/Analysis/RegionStore.cpp
parentb657f115c3b4e262e72906a28cbcf3eaccd9460c (diff)
Fix: <rdar://problem/7242006> [RegionStore] compound literal assignment with floats not honored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 8b5848f523..b54fa272a0 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -1397,6 +1397,7 @@ const GRState *RegionStoreManager::BindArray(const GRState *state,
if (CAT->getElementType()->isStructureType())
state = BindStruct(state, ER, *VI);
else
+ // FIXME: Do we need special handling of nested arrays?
state = Bind(state, ValMgr.makeLoc(ER), *VI);
}
@@ -1448,14 +1449,14 @@ RegionStoreManager::BindStruct(const GRState *state, const TypedRegion* R,
break;
QualType FTy = (*FI)->getType();
- FieldRegion* FR = MRMgr.getFieldRegion(*FI, R);
+ const FieldRegion* FR = MRMgr.getFieldRegion(*FI, R);
- if (Loc::IsLocType(FTy) || FTy->isIntegerType())
- state = Bind(state, ValMgr.makeLoc(FR), *VI);
- else if (FTy->isArrayType())
+ if (FTy->isArrayType())
state = BindArray(state, FR, *VI);
else if (FTy->isStructureType())
state = BindStruct(state, FR, *VI);
+ else
+ state = Bind(state, ValMgr.makeLoc(FR), *VI);
}
// There may be fewer values in the initialize list than the fields of struct.