]> granicus.if.org Git - clang/commitdiff
Rename CXXExprWithCleanup to CXXExprWithTemporaries.
authorAnders Carlsson <andersca@mac.com>
Fri, 1 May 2009 22:18:43 +0000 (22:18 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 1 May 2009 22:18:43 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70584 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ExprCXX.h
include/clang/AST/StmtNodes.def
lib/AST/ExprCXX.cpp
lib/AST/StmtPrinter.cpp

index 568a9f2a4595ab8927cd8a518ada078e9be42dd5..483f0e31d61aa0bf409ce886563a38758a0ba727 100644 (file)
@@ -923,39 +923,16 @@ public:
   virtual StmtIterator child_end();
 };
 
-/// CXXDestroyExpr - Represents an implicit call to a C++ destructor.
-class CXXDestroyExpr : public Expr {
-  VarDecl *VD;
-  
-  CXXDestroyExpr(VarDecl* vd, QualType T) 
-  : Expr(CXXDestroyExprClass, T, false, vd->getType()->isDependentType()),
-    VD(vd) { }
-  
-public:
-  static CXXDestroyExpr *Create(ASTContext &C, VarDecl *vd);
-
-  virtual SourceRange getSourceRange() const { return SourceRange(); }
-  
-  // Implement isa/cast/dyncast/etc.
-  static bool classof(const Stmt *T) {
-    return T->getStmtClass() == CXXDestroyExprClass;
-  }
-  static bool classof(const CXXDestroyExpr *) { return true; }
-  
-  // Iterators
-  virtual child_iterator child_begin();
-  virtual child_iterator child_end();
-};
-
-class CXXExprWithCleanup : public Expr {
+class CXXExprWithTemporaries : public Expr {
   Stmt *SubExpr;
     
   CXXTempVarDecl **Decls;
   unsigned NumDecls;
 
 public:
-  CXXExprWithCleanup(Expr *subexpr, CXXTempVarDecl **decls, unsigned numdecls);
-  ~CXXExprWithCleanup();
+  CXXExprWithTemporaries(Expr *subexpr, CXXTempVarDecl **decls, 
+                         unsigned numdecls);
+  ~CXXExprWithTemporaries();
 
   const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
   Expr *getSubExpr() { return cast<Expr>(SubExpr); }
@@ -964,9 +941,9 @@ public:
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Stmt *T) {
-    return T->getStmtClass() == CXXExprWithCleanupClass;
+    return T->getStmtClass() == CXXExprWithTemporariesClass;
   }
-  static bool classof(const CXXExprWithCleanup *) { return true; }
+  static bool classof(const CXXExprWithTemporaries *) { return true; }
 
   // Iterators
   virtual child_iterator child_begin();
index 8d1045864ba93886a9335f2f80cfa83d2738c235..eb518291650304f2d30ff91bf5d7ed9e4607c010 100644 (file)
@@ -120,7 +120,7 @@ STMT(QualifiedDeclRefExpr   , DeclRefExpr)
 STMT(UnresolvedDeclRefExpr  , Expr)
 STMT(CXXDestroyExpr         , Expr)
 STMT(CXXConstructExpr       , Expr)
-STMT(CXXExprWithCleanup     , Expr)
+STMT(CXXExprWithTemporaries , Expr)
 STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
 
 // Obj-C Expressions.
index dc0b57372f29ede58752f963d7338f71b6a78385..c28086147feb1db80131c4783ac8e6402b7f8b6a 100644 (file)
@@ -274,9 +274,10 @@ CXXDestroyExpr *CXXDestroyExpr::Create(ASTContext &C, VarDecl *vd) {
   return new (C) CXXDestroyExpr(vd, C.VoidTy);
 }
 
-CXXExprWithCleanup::CXXExprWithCleanup(Expr *subexpr, CXXTempVarDecl **decls, 
-                                       unsigned numdecls)
-: Expr(CXXExprWithCleanupClass, subexpr->getType(),
+CXXExprWithTemporaries::CXXExprWithTemporaries(Expr *subexpr, 
+                                               CXXTempVarDecl **decls, 
+                                               unsigned numdecls)
+: Expr(CXXExprWithTemporariesClass, subexpr->getType(),
        subexpr->isTypeDependent(), subexpr->isValueDependent()), 
   SubExpr(subexpr), Decls(0), NumDecls(numdecls) {
   if (NumDecls > 0) {
@@ -286,7 +287,7 @@ CXXExprWithCleanup::CXXExprWithCleanup(Expr *subexpr, CXXTempVarDecl **decls,
   }
 }
 
-CXXExprWithCleanup::~CXXExprWithCleanup() {
+CXXExprWithTemporaries::~CXXExprWithTemporaries() {
   delete[] Decls;
 }
 
@@ -306,7 +307,7 @@ Stmt::child_iterator CXXDestroyExpr::child_end() {
   return child_iterator();
 }
 
-// CXXExprWithCleanup
-Stmt::child_iterator CXXExprWithCleanup::child_begin() { return &SubExpr; }
-Stmt::child_iterator CXXExprWithCleanup::child_end() { return &SubExpr + 1; }
+// CXXExprWithTemporaries
+Stmt::child_iterator CXXExprWithTemporaries::child_begin() { return &SubExpr; }
+Stmt::child_iterator CXXExprWithTemporaries::child_end() { return &SubExpr + 1;}
 
index 1a74937be94e70ffe5b10cfd545677ca143bd02e..c083efac9bf3e81b6c296545ae1d45663b9eba2b 100644 (file)
@@ -1105,7 +1105,7 @@ void StmtPrinter::VisitCXXDestroyExpr(CXXDestroyExpr *E) {
   // Nothing to print.
 }
 
-void StmtPrinter::VisitCXXExprWithCleanup(CXXExprWithCleanup *E) {
+void StmtPrinter::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
   // Just forward to the sub expression.
   PrintExpr(E->getSubExpr());
 }