diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index 536e14944b68..ae0383d06eb3 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -168,6 +168,9 @@ SVal RegionStoreManager::getLValueElement(const GRState* St, if (Base.isUnknownOrUndef()) return Base; + if (isa(Base)) + return Base; + loc::MemRegionVal& BaseL = cast(Base); // We expect BaseR is an ElementRegion, not a base VarRegion.