diff options
author | Anna Zaks <ganna@apple.com> | 2012-05-09 17:23:15 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-05-09 17:23:15 +0000 |
commit | d60f4c8fefbad141a736d89254785aae3f8a1349 (patch) | |
tree | 077cbe64898b4fbfc8e697f119a779c7518b75f4 /clang/lib/StaticAnalyzer | |
parent | 325520a7b89e077eb98359eb9df19e6cde4db7c5 (diff) | |
download | bcm5719-llvm-d60f4c8fefbad141a736d89254785aae3f8a1349.tar.gz bcm5719-llvm-d60f4c8fefbad141a736d89254785aae3f8a1349.zip |
[analyzer] Simplify r156446, as per Ted's review.
llvm-svn: 156482
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp index 487327e7fcb..1b941cc680b 100644 --- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/clang/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); |