aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-11-18 13:11:04 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-11-18 13:11:04 +0000
commit9b6ceb17123f8eb842059cbcf9ecddd79c495e2e (patch)
tree1889f81918e990405019083ab084f773f81d6910 /lib/Analysis/RegionStore.cpp
parent56b05c8829efd13b7e5b333f8f587c71d025c67d (diff)
handle the case that the array element is of structure type when bind the whole array to a single value (for example, UnknownVal, UndefinedVal).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index fab2e60538..6eba8bbd61 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -569,7 +569,10 @@ Store RegionStoreManager::BindArrayToVal(Store store, const TypedRegion* BaseR,
ElementRegion* ER = MRMgr.getElementRegion(Idx, BaseR);
- store = Bind(store, loc::MemRegionVal(ER), V);
+ if (CAT->getElementType()->isStructureType())
+ store = BindStructToVal(store, ER, V);
+ else
+ store = Bind(store, loc::MemRegionVal(ER), V);
}
}