From 50b5a5c32e07301e4edcc01aca1f8a49a128c66c Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Wed, 9 May 2012 17:23:15 +0000 Subject: [PATCH] [analyzer] Simplify r156446, as per Ted's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156482 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/RegionStore.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 487327e7fc..1b941cc680 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1154,13 +1154,8 @@ RegionStoreManager::GetLazyBinding(RegionBindings B, const MemRegion *R, SVal RegionStoreManager::getBindingForElement(Store store, const ElementRegion* R) { // We do not currently model bindings of the CompoundLiteralregion. - const ElementRegion *Tmp = R; - while (Tmp) { - const MemRegion *Sup = Tmp->getSuperRegion(); - if (isa(Sup)) - return UnknownVal(); - Tmp = dyn_cast(Sup); - } + if (isa(R->getBaseRegion())) + return UnknownVal(); // Check if the region has a binding. RegionBindings B = GetRegionBindings(store); -- 2.40.0