From: Zhongxing Xu Date: Tue, 18 Nov 2008 13:11:04 +0000 (+0000) Subject: handle the case that the array element is of structure type when bind the whole array... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b6ceb17123f8eb842059cbcf9ecddd79c495e2e;p=clang 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 --- 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); } }