]> granicus.if.org Git - clang/commitdiff
We cannot get precise lvalue for symbolic base array region.
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 27 Oct 2008 12:23:17 +0000 (12:23 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 27 Oct 2008 12:23:17 +0000 (12:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index 536e14944b686ea5df69418c259071bf0ad9e381..ae0383d06eb316e4f83903a4283fb45a8e89b2ae 100644 (file)
@@ -168,6 +168,9 @@ SVal RegionStoreManager::getLValueElement(const GRState* St,
   if (Base.isUnknownOrUndef())
     return Base;
 
+  if (isa<loc::SymbolVal>(Base))
+    return Base;
+
   loc::MemRegionVal& BaseL = cast<loc::MemRegionVal>(Base);
 
   // We expect BaseR is an ElementRegion, not a base VarRegion.