]> granicus.if.org Git - clang/commitdiff
handle the case that the array element is of structure type when bind the whole array...
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 18 Nov 2008 13:11:04 +0000 (13:11 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 18 Nov 2008 13:11:04 +0000 (13:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59521 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index fab2e605383993dcc37a59e2ccae1677f4817460..6eba8bbd61a2a53fb6649612e86f3b9a13be7c68 100644 (file)
@@ -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);
     }
   }