[cfe-commits] r70586 - in /cfe/trunk: include/clang/AST/StmtNodes.def lib/AST/ExprCXX.cpp lib/AST/StmtPrinter.cpp
Anders Carlsson
andersca at mac.com
Fri May 1 15:21:23 PDT 2009
Author: andersca
Date: Fri May 1 17:21:22 2009
New Revision: 70586
URL: http://llvm.org/viewvc/llvm-project?rev=70586&view=rev
Log:
Get rid of CXXDestroyExpr.
Modified:
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/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.def?rev=70586&r1=70585&r2=70586&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/trunk/include/clang/AST/StmtNodes.def Fri May 1 17:21:22 2009
@@ -118,7 +118,6 @@
STMT(UnaryTypeTraitExpr , Expr)
STMT(QualifiedDeclRefExpr , DeclRefExpr)
STMT(UnresolvedDeclRefExpr , Expr)
-STMT(CXXDestroyExpr , Expr)
STMT(CXXConstructExpr , Expr)
STMT(CXXExprWithTemporaries , Expr)
STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=70586&r1=70585&r2=70586&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Fri May 1 17:21:22 2009
@@ -267,13 +267,6 @@
C.Deallocate(this);
}
-CXXDestroyExpr *CXXDestroyExpr::Create(ASTContext &C, VarDecl *vd) {
- assert((vd->getKind() == Decl::CXXTempVar || vd->getKind() == Decl::Var) &&
- "Can only create a destroy expr with a temp var decl or a var decl!");
-
- return new (C) CXXDestroyExpr(vd, C.VoidTy);
-}
-
CXXExprWithTemporaries::CXXExprWithTemporaries(Expr *subexpr,
CXXTempVarDecl **decls,
unsigned numdecls)
@@ -299,15 +292,12 @@
return &Args[0]+NumArgs;
}
-// CXXDestroyExpr
-Stmt::child_iterator CXXDestroyExpr::child_begin() {
- return child_iterator();
-}
-Stmt::child_iterator CXXDestroyExpr::child_end() {
- return child_iterator();
+// CXXExprWithTemporaries
+Stmt::child_iterator CXXExprWithTemporaries::child_begin() {
+ return &SubExpr;
}
-// CXXExprWithTemporaries
-Stmt::child_iterator CXXExprWithTemporaries::child_begin() { return &SubExpr; }
-Stmt::child_iterator CXXExprWithTemporaries::child_end() { return &SubExpr + 1;}
+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=70586&r1=70585&r2=70586&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Fri May 1 17:21:22 2009
@@ -1101,10 +1101,6 @@
// Nothing to print.
}
-void StmtPrinter::VisitCXXDestroyExpr(CXXDestroyExpr *E) {
- // Nothing to print.
-}
-
void StmtPrinter::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
// Just forward to the sub expression.
PrintExpr(E->getSubExpr());
More information about the cfe-commits
mailing list