aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/StmtNodes.def1
-rw-r--r--lib/AST/ExprCXX.cpp22
-rw-r--r--lib/AST/StmtPrinter.cpp4
3 files changed, 6 insertions, 21 deletions
diff --git a/include/clang/AST/StmtNodes.def b/include/clang/AST/StmtNodes.def
index eb51829165..71dd77b4e5 100644
--- a/include/clang/AST/StmtNodes.def
+++ b/include/clang/AST/StmtNodes.def
@@ -118,7 +118,6 @@ STMT(UnresolvedFunctionNameExpr , Expr)
STMT(UnaryTypeTraitExpr , Expr)
STMT(QualifiedDeclRefExpr , DeclRefExpr)
STMT(UnresolvedDeclRefExpr , Expr)
-STMT(CXXDestroyExpr , Expr)
STMT(CXXConstructExpr , Expr)
STMT(CXXExprWithTemporaries , Expr)
STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp
index c28086147f..b05bf7d4ac 100644
--- a/lib/AST/ExprCXX.cpp
+++ b/lib/AST/ExprCXX.cpp
@@ -267,13 +267,6 @@ void CXXConstructExpr::Destroy(ASTContext &C) {
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 @@ Stmt::child_iterator CXXConstructExpr::child_end() {
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;
+}
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index c083efac9b..0f8284a2eb 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -1101,10 +1101,6 @@ void StmtPrinter::VisitCXXConstructExpr(CXXConstructExpr *E) {
// 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());