]> granicus.if.org Git - clang/commitdiff
Revert 70293.
authorTed Kremenek <kremenek@apple.com>
Tue, 28 Apr 2009 18:48:13 +0000 (18:48 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 28 Apr 2009 18:48:13 +0000 (18:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70313 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 8a8c704d623c362bc47a1499a9c2ef6bcc4274ce..538f4f2722249824dad5e344f915b20b23f2f5e7 100644 (file)
@@ -1904,6 +1904,13 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst,
         
         const TypedRegion* R = dyn_cast<TypedRegion>(MR->getRegion());
         
+        // Blast through TypedViewRegions to get the original region type.
+        while (R) {
+          const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R);
+          if (!ATR) break;
+          R = dyn_cast<TypedRegion>(ATR->getSuperRegion());
+        }
+        
         if (R) {          
           // Is the invalidated variable something that we were tracking?
           SymbolRef Sym = state.GetSValAsScalarOrLoc(R).getAsLocSymbol();