summaryrefslogtreecommitdiffstats
path: root/clang/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
commitf87a7abcd4d3618325c9701a607fdbf3eaad18e6 (patch)
treefda2b70d504c43a9387c770d9b872cf16e527c9b /clang/lib/Analysis/RegionStore.cpp
parent13020d22da26c1f14f2d91ba5859b81384950c15 (diff)
downloadbcm5719-llvm-f87a7abcd4d3618325c9701a607fdbf3eaad18e6.tar.gz
bcm5719-llvm-f87a7abcd4d3618325c9701a607fdbf3eaad18e6.zip
handle the case that the array element is of structure type when bind the whole array to a single value (for example, UnknownVal, UndefinedVal).
llvm-svn: 59521
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index fab2e605383..6eba8bbd61a 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud