[cfe-commits] r65764 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h lib/Analysis/BasicObjCFoundationChecks.cpp lib/Analysis/BasicStore.cpp lib/Analysis/CFRefCount.cpp lib/Analysis/MemRegion.cpp lib/Analysis/RegionStore.cpp

Ted Kremenek kremenek at apple.com
Sat Feb 28 21:44:08 PST 2009


Author: kremenek
Date: Sat Feb 28 23:44:08 2009
New Revision: 65764

URL: http://llvm.org/viewvc/llvm-project?rev=65764&view=rev
Log:
Rename AnonTypedRegion to TypedViewRegion.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
    cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
    cfe/trunk/lib/Analysis/BasicStore.cpp
    cfe/trunk/lib/Analysis/CFRefCount.cpp
    cfe/trunk/lib/Analysis/MemRegion.cpp
    cfe/trunk/lib/Analysis/RegionStore.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h Sat Feb 28 23:44:08 2009
@@ -45,7 +45,7 @@
                SymbolicRegionKind,
                CompoundLiteralRegionKind,
                StringRegionKind, ElementRegionKind,
-               AnonTypedRegionKind,
+               TypedViewRegionKind,
                AnonPointeeRegionKind,
                // Decl Regions.
                  BEG_DECL_REGIONS,
@@ -224,13 +224,13 @@
   }
 };
 
-class AnonTypedRegion : public TypedRegion {
+class TypedViewRegion : public TypedRegion {
   friend class MemRegionManager;
 
   QualType T;
 
-  AnonTypedRegion(QualType t, const MemRegion* sreg)
-    : TypedRegion(sreg, AnonTypedRegionKind), T(t) {}
+  TypedViewRegion(QualType t, const MemRegion* sreg)
+    : TypedRegion(sreg, TypedViewRegionKind), T(t) {}
 
   static void ProfileRegion(llvm::FoldingSetNodeID& ID, QualType T, 
                             const MemRegion* superRegion);
@@ -248,7 +248,7 @@
   }
 
   static bool classof(const MemRegion* R) {
-    return R->getKind() == AnonTypedRegionKind;
+    return R->getKind() == TypedViewRegionKind;
   }
 };
   
@@ -527,7 +527,7 @@
   ObjCIvarRegion* getObjCIvarRegion(const ObjCIvarDecl* ivd,
                                     const MemRegion* superRegion);
 
-  AnonTypedRegion* getAnonTypedRegion(QualType t, const MemRegion* superRegion);
+  TypedViewRegion* getTypedViewRegion(QualType t, const MemRegion* superRegion);
 
   bool hasStackStorage(const MemRegion* R);
 

Modified: cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp Sat Feb 28 23:44:08 2009
@@ -412,7 +412,7 @@
   const TypedRegion* R = dyn_cast<TypedRegion>(LV->getRegion());
   if (!R) return false;
   
-  while (const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R)) {
+  while (const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R)) {
     R = dyn_cast<TypedRegion>(ATR->getSuperRegion());
     if (!R) return false;
   }

Modified: cfe/trunk/lib/Analysis/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicStore.cpp?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Sat Feb 28 23:44:08 2009
@@ -159,7 +159,7 @@
       return CastResult(state, R);
   }
 
-  return CastResult(state, MRMgr.getAnonTypedRegion(CastToTy, R));
+  return CastResult(state, MRMgr.getTypedViewRegion(CastToTy, R));
 }
   
 SVal BasicStoreManager::getLValueField(const GRState* St, SVal Base,
@@ -223,7 +223,7 @@
                                                   StateMgr.getSymbolManager());
       // Layered a typed region on top of this.
       QualType T = StateMgr.getSymbolManager().getType(Sym);
-      BaseR = MRMgr.getAnonTypedRegion(T, SymR);
+      BaseR = MRMgr.getTypedViewRegion(T, SymR);
       break;
     }
       

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Sat Feb 28 23:44:08 2009
@@ -1643,9 +1643,9 @@
         
         const TypedRegion* R = dyn_cast<TypedRegion>(MR->getRegion());
         
-        // Blast through AnonTypedRegions to get the original region type.
+        // Blast through TypedViewRegions to get the original region type.
         while (R) {
-          const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R);
+          const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R);
           if (!ATR) break;
           R = dyn_cast<TypedRegion>(ATR->getSuperRegion());
         }

Modified: cfe/trunk/lib/Analysis/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/MemRegion.cpp (original)
+++ cfe/trunk/lib/Analysis/MemRegion.cpp Sat Feb 28 23:44:08 2009
@@ -57,9 +57,9 @@
   ProfileRegion(ID, Ex, Cnt);
 }
 
-void AnonTypedRegion::ProfileRegion(llvm::FoldingSetNodeID& ID, QualType T, 
+void TypedViewRegion::ProfileRegion(llvm::FoldingSetNodeID& ID, QualType T, 
                                     const MemRegion* superRegion) {
-  ID.AddInteger((unsigned) AnonTypedRegionKind);
+  ID.AddInteger((unsigned) TypedViewRegionKind);
   ID.Add(T);
   ID.AddPointer(superRegion);
 }
@@ -160,7 +160,7 @@
   os << "alloca{" << (void*) Ex << ',' << Cnt << '}';
 }
 
-void AnonTypedRegion::print(llvm::raw_ostream& os) const {
+void TypedViewRegion::print(llvm::raw_ostream& os) const {
   os << "anon_type{" << T.getAsString() << ',';
   getSuperRegion()->print(os);
   os << '}';
@@ -399,18 +399,18 @@
   return R;
 }
 
-AnonTypedRegion* 
-MemRegionManager::getAnonTypedRegion(QualType t, const MemRegion* superRegion) {
+TypedViewRegion* 
+MemRegionManager::getTypedViewRegion(QualType t, const MemRegion* superRegion) {
   llvm::FoldingSetNodeID ID;
-  AnonTypedRegion::ProfileRegion(ID, t, superRegion);
+  TypedViewRegion::ProfileRegion(ID, t, superRegion);
 
   void* InsertPos;
   MemRegion* data = Regions.FindNodeOrInsertPos(ID, InsertPos);
-  AnonTypedRegion* R = cast_or_null<AnonTypedRegion>(data);
+  TypedViewRegion* R = cast_or_null<TypedViewRegion>(data);
 
   if (!R) {
-    R = (AnonTypedRegion*) A.Allocate<AnonTypedRegion>();
-    new (R) AnonTypedRegion(t, superRegion);
+    R = (TypedViewRegion*) A.Allocate<TypedViewRegion>();
+    new (R) TypedViewRegion(t, superRegion);
     Regions.InsertNode(R, InsertPos);
   }
 

Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=65764&r1=65763&r2=65764&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Sat Feb 28 23:44:08 2009
@@ -365,7 +365,7 @@
     //   char *p = __builtin_alloc(10);
     //   p[1] = 8;
     //
-    //  Observe that 'p' binds to an AnonTypedRegion<AllocaRegion>.
+    //  Observe that 'p' binds to an TypedViewRegion<AllocaRegion>.
     //
 
     // Offset might be unsigned. We have to convert it to signed ConcreteInt.
@@ -442,7 +442,7 @@
     return NonLoc::MakeIntVal(getBasicVals(), Str->getByteLength()+1, false);
   }
 
-  if (const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R)) {
+  if (const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R)) {
 #if 0
     // FIXME: This logic doesn't really work, as we can have all sorts of
     // weird cases.  For example, this crashes on test case 'rdar-6442306-1.m'.
@@ -547,7 +547,7 @@
   //      char* y = (char*) x;
   //      void* z = (void*) y; // <-- we should get the same region that is 
   //                                  bound to 'x'
-  const MemRegion* ViewR = MRMgr.getAnonTypedRegion(CastToTy, R);  
+  const MemRegion* ViewR = MRMgr.getTypedViewRegion(CastToTy, R);  
   return CastResult(AddRegionView(state, ViewR, R), ViewR);
 }
 





More information about the cfe-commits mailing list