summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-05-09 17:23:15 +0000
committerAnna Zaks <ganna@apple.com>2012-05-09 17:23:15 +0000
commitd60f4c8fefbad141a736d89254785aae3f8a1349 (patch)
tree077cbe64898b4fbfc8e697f119a779c7518b75f4 /clang/lib/StaticAnalyzer
parent325520a7b89e077eb98359eb9df19e6cde4db7c5 (diff)
downloadbcm5719-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.cpp9
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);
OpenPOWER on IntegriCloud