]> granicus.if.org Git - clang/commitdiff
When stripping element regions for invalidating region values, treat FieldRegions...
authorTed Kremenek <kremenek@apple.com>
Mon, 11 May 2009 22:55:17 +0000 (22:55 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 11 May 2009 22:55:17 +0000 (22:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71488 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 29a28c1a19992850f7e990aa5d93987fb06a7a23..bc140077dc768907880b322e1350ba839aa58b23 100644 (file)
@@ -2673,10 +2673,13 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst,
             // approriately delegated to the respective StoreManagers while
             // still allowing us to do checker-specific logic (e.g.,
             // invalidating reference counts), probably via callbacks.            
-            if (ER->getElementType()->isIntegralType())
-              if (const VarRegion *superReg =
-                  dyn_cast<VarRegion>(ER->getSuperRegion()))
-                R = superReg;
+            if (ER->getElementType()->isIntegralType()) {
+              const MemRegion *superReg = ER->getSuperRegion();
+              if (isa<VarRegion>(superReg) || isa<FieldRegion>(superReg) ||
+                  isa<ObjCIvarRegion>(superReg))
+                R = cast<TypedRegion>(superReg);
+            }
+
             // FIXME: What about layers of ElementRegions?
           }