[cfe-commits] r120176 - in /cfe/trunk: include/clang/Checker/PathSensitive/MemRegion.h lib/Checker/CStringChecker.cpp lib/Checker/GRCXXExprEngine.cpp lib/Checker/MemRegion.cpp lib/Checker/RegionStore.cpp lib/Checker/Store.cpp

Zhongxing Xu xuzhongxing at gmail.com
Fri Nov 26 00:52:49 PST 2010


Author: zhongxingxu
Date: Fri Nov 26 02:52:48 2010
New Revision: 120176

URL: http://llvm.org/viewvc/llvm-project?rev=120176&view=rev
Log:
Rename CXXObjectRegion to CXXTempObjectRegion.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/MemRegion.h
    cfe/trunk/lib/Checker/CStringChecker.cpp
    cfe/trunk/lib/Checker/GRCXXExprEngine.cpp
    cfe/trunk/lib/Checker/MemRegion.cpp
    cfe/trunk/lib/Checker/RegionStore.cpp
    cfe/trunk/lib/Checker/Store.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/MemRegion.h?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/MemRegion.h Fri Nov 26 02:52:48 2010
@@ -94,7 +94,7 @@
     FieldRegionKind,
     ObjCIvarRegionKind,
     END_DECL_REGIONS = ObjCIvarRegionKind,
-    CXXObjectRegionKind,
+    CXXTempObjectRegionKind,
     CXXBaseObjectRegionKind,
     END_TYPED_REGIONS = CXXBaseObjectRegionKind
   };
@@ -826,13 +826,13 @@
 };
 
 // C++ temporary object associated with an expression.
-class CXXObjectRegion : public TypedRegion {
+class CXXTempObjectRegion : public TypedRegion {
   friend class MemRegionManager;
 
   Expr const *Ex;
 
-  CXXObjectRegion(Expr const *E, MemRegion const *sReg) 
-    : TypedRegion(sReg, CXXObjectRegionKind), Ex(E) {}
+  CXXTempObjectRegion(Expr const *E, MemRegion const *sReg) 
+    : TypedRegion(sReg, CXXTempObjectRegionKind), Ex(E) {}
 
   static void ProfileRegion(llvm::FoldingSetNodeID &ID,
                             Expr const *E, const MemRegion *sReg);
@@ -847,7 +847,7 @@
   void Profile(llvm::FoldingSetNodeID &ID) const;
 
   static bool classof(const MemRegion* R) {
-    return R->getKind() == CXXObjectRegionKind;
+    return R->getKind() == CXXTempObjectRegionKind;
   }
 };
 
@@ -999,8 +999,8 @@
   const ObjCIvarRegion *getObjCIvarRegion(const ObjCIvarDecl* ivd,
                                           const MemRegion* superRegion);
 
-  const CXXObjectRegion *getCXXObjectRegion(Expr const *Ex,
-                                            LocationContext const *LC);
+  const CXXTempObjectRegion *getCXXTempObjectRegion(Expr const *Ex,
+                                                    LocationContext const *LC);
 
   const CXXBaseObjectRegion *getCXXBaseObjectRegion(const CXXRecordDecl *decl,
                                                   const MemRegion *superRegion);

Modified: cfe/trunk/lib/Checker/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CStringChecker.cpp?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CStringChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CStringChecker.cpp Fri Nov 26 02:52:48 2010
@@ -629,8 +629,8 @@
     os << "a block";
     return true;
   case MemRegion::CXXThisRegionKind:
-  case MemRegion::CXXObjectRegionKind:
-    os << "a C++ object of type " << TR->getValueType().getAsString();
+  case MemRegion::CXXTempObjectRegionKind:
+    os << "a C++ temp object of type " << TR->getValueType().getAsString();
     return true;
   case MemRegion::VarRegionKind:
     os << "a variable of type" << TR->getValueType().getAsString();

Modified: cfe/trunk/lib/Checker/GRCXXExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRCXXExprEngine.cpp?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRCXXExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRCXXExprEngine.cpp Fri Nov 26 02:52:48 2010
@@ -95,7 +95,7 @@
     SVal V = state->getSVal(Ex);
 
     const MemRegion *R =
-      ValMgr.getRegionManager().getCXXObjectRegion(Ex,
+      ValMgr.getRegionManager().getCXXTempObjectRegion(Ex,
                                                    Pred->getLocationContext());
 
     state = state->bindLoc(loc::MemRegionVal(R), V);
@@ -108,7 +108,7 @@
                                          ExplodedNode *Pred,
                                          ExplodedNodeSet &Dst, bool asLValue) {
   if (!Dest)
-    Dest = ValMgr.getRegionManager().getCXXObjectRegion(E,
+    Dest = ValMgr.getRegionManager().getCXXTempObjectRegion(E,
                                                     Pred->getLocationContext());
 
   if (E->isElidable()) {

Modified: cfe/trunk/lib/Checker/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MemRegion.cpp?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MemRegion.cpp (original)
+++ cfe/trunk/lib/Checker/MemRegion.cpp Fri Nov 26 02:52:48 2010
@@ -360,14 +360,14 @@
   BlockDataRegion::ProfileRegion(ID, BC, LC, getSuperRegion());
 }
 
-void CXXObjectRegion::ProfileRegion(llvm::FoldingSetNodeID &ID,
-                                    Expr const *Ex,
-                                    const MemRegion *sReg) {
+void CXXTempObjectRegion::ProfileRegion(llvm::FoldingSetNodeID &ID,
+                                        Expr const *Ex,
+                                        const MemRegion *sReg) {
   ID.AddPointer(Ex);
   ID.AddPointer(sReg);
 }
 
-void CXXObjectRegion::Profile(llvm::FoldingSetNodeID &ID) const {
+void CXXTempObjectRegion::Profile(llvm::FoldingSetNodeID &ID) const {
   ProfileRegion(ID, Ex, getSuperRegion());
 }
 
@@ -422,7 +422,7 @@
   os << "{ " << (void*) CL <<  " }";
 }
 
-void CXXObjectRegion::dumpToStream(llvm::raw_ostream &os) const {
+void CXXTempObjectRegion::dumpToStream(llvm::raw_ostream &os) const {
   os << "temp_object";
 }
 
@@ -698,12 +698,12 @@
   return getSubRegion<ObjCIvarRegion>(d, superRegion);
 }
 
-const CXXObjectRegion*
-MemRegionManager::getCXXObjectRegion(Expr const *E,
-                                     LocationContext const *LC) {
+const CXXTempObjectRegion*
+MemRegionManager::getCXXTempObjectRegion(Expr const *E,
+                                         LocationContext const *LC) {
   const StackFrameContext *SFC = LC->getCurrentStackFrame();
   assert(SFC);
-  return getSubRegion<CXXObjectRegion>(E, getStackLocalsRegion(SFC));
+  return getSubRegion<CXXTempObjectRegion>(E, getStackLocalsRegion(SFC));
 }
 
 const CXXBaseObjectRegion *
@@ -870,7 +870,7 @@
     case CXXThisRegionKind:
     case StringRegionKind:
     case VarRegionKind:
-    case CXXObjectRegionKind:
+    case CXXTempObjectRegionKind:
       goto Finish;
     case ElementRegionKind: {
       const ElementRegion *ER = cast<ElementRegion>(R);

Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Fri Nov 26 02:52:48 2010
@@ -879,7 +879,7 @@
     case MemRegion::CompoundLiteralRegionKind:
     case MemRegion::FieldRegionKind:
     case MemRegion::ObjCIvarRegionKind:
-    case MemRegion::CXXObjectRegionKind:
+    case MemRegion::CXXTempObjectRegionKind:
     case MemRegion::CXXBaseObjectRegionKind:
       return UnknownVal();
 

Modified: cfe/trunk/lib/Checker/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/Store.cpp?rev=120176&r1=120175&r2=120176&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/Store.cpp (original)
+++ cfe/trunk/lib/Checker/Store.cpp Fri Nov 26 02:52:48 2010
@@ -113,7 +113,8 @@
     case MemRegion::FieldRegionKind:
     case MemRegion::ObjCIvarRegionKind:
     case MemRegion::VarRegionKind:
-    case MemRegion::CXXObjectRegionKind:
+    case MemRegion::CXXTempObjectRegionKind:
+    case MemRegion::CXXBaseObjectRegionKind:
       return MakeElementRegion(R, PointeeTy);
 
     case MemRegion::ElementRegionKind: {





More information about the cfe-commits mailing list