[cfe-commits] r156482 - /cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp

Anna Zaks ganna at apple.com
Wed May 9 10:23:15 PDT 2012


Author: zaks
Date: Wed May  9 12:23:15 2012
New Revision: 156482

URL: http://llvm.org/viewvc/llvm-project?rev=156482&view=rev
Log:
[analyzer] Simplify r156446, as per Ted's review.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=156482&r1=156481&r2=156482&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Wed May  9 12:23:15 2012
@@ -1154,13 +1154,8 @@
 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);





More information about the cfe-commits mailing list