]> granicus.if.org Git - clang/commitdiff
Actually all regions whose super region is not MemSpaceRegion are of these 3
authorZhongxing Xu <xuzhongxing@gmail.com>
Sat, 17 Oct 2009 07:32:08 +0000 (07:32 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sat, 17 Oct 2009 07:32:08 +0000 (07:32 +0000)
kinds. This means we are visiting all regions 'from super region'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84319 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index 18d58ab10f699eed13544e08b8a2279454c7fec9..fe142af07a7d8553a8621ba3444d5bd2d55f9607 100644 (file)
@@ -1741,11 +1741,10 @@ void RegionStoreManager::RemoveDeadBindings(GRState &state, Stmt* Loc,
         // for the other fields and elements around.  The reason is that
         // pointer arithmetic can get us to the other fields or elements.
         // FIXME: add an assertion that this is always true.
-        VisitFlag NewVisit =
-          isa<FieldRegion>(R) || isa<ElementRegion>(R) || isa<ObjCIvarRegion>(R)
-          ? VisitedFromSuperRegion : VisitedFromSubRegion;
-        
-        WorkList.push_back(RBDItem(state_N, superR, NewVisit));
+
+        assert(isa<FieldRegion>(R) || isa<ElementRegion>(R) 
+               || isa<ObjCIvarRegion>(R));
+        WorkList.push_back(RBDItem(state_N, superR, VisitedFromSuperRegion));
       }
     }