diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/RegionStore.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 9 |
1 files 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<CompoundLiteralRegion>(Sup)) - return UnknownVal(); - Tmp = dyn_cast<ElementRegion>(Sup); - } + if (isa<CompoundLiteralRegion>(R->getBaseRegion())) + return UnknownVal(); // Check if the region has a binding. RegionBindings B = GetRegionBindings(store); |