[cfe-commits] r70584 - in /cfe/trunk: include/clang/AST/ExprCXX.h include/clang/AST/StmtNodes.def lib/AST/ExprCXX.cpp lib/AST/StmtPrinter.cpp

Anders Carlsson andersca at mac.com
Fri May 1 15:18:43 PDT 2009


Author: andersca
Date: Fri May  1 17:18:43 2009
New Revision: 70584

URL: http://llvm.org/viewvc/llvm-project?rev=70584&view=rev
Log:
Rename CXXExprWithCleanup to CXXExprWithTemporaries.

Modified:
    cfe/trunk/include/clang/AST/ExprCXX.h
    cfe/trunk/include/clang/AST/StmtNodes.def
    cfe/trunk/lib/AST/ExprCXX.cpp
    cfe/trunk/lib/AST/StmtPrinter.cpp

Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=70584&r1=70583&r2=70584&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Fri May  1 17:18:43 2009
@@ -923,39 +923,16 @@
   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 @@
 
   // 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();

Modified: cfe/trunk/include/clang/AST/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.def?rev=70584&r1=70583&r2=70584&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/trunk/include/clang/AST/StmtNodes.def Fri May  1 17:18:43 2009
@@ -120,7 +120,7 @@
 STMT(UnresolvedDeclRefExpr  , Expr)
 STMT(CXXDestroyExpr         , Expr)
 STMT(CXXConstructExpr       , Expr)
-STMT(CXXExprWithCleanup     , Expr)
+STMT(CXXExprWithTemporaries , Expr)
 STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
 
 // Obj-C Expressions.

Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=70584&r1=70583&r2=70584&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Fri May  1 17:18:43 2009
@@ -274,9 +274,10 @@
   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() {
+CXXExprWithTemporaries::~CXXExprWithTemporaries() {
   delete[] Decls;
 }
 
@@ -306,7 +307,7 @@
   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;}
 

Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=70584&r1=70583&r2=70584&view=diff

==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Fri May  1 17:18:43 2009
@@ -1105,7 +1105,7 @@
   // Nothing to print.
 }
 
-void StmtPrinter::VisitCXXExprWithCleanup(CXXExprWithCleanup *E) {
+void StmtPrinter::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
   // Just forward to the sub expression.
   PrintExpr(E->getSubExpr());
 }





More information about the cfe-commits mailing list