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); }
// 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();
STMT(UnresolvedDeclRefExpr , Expr)
STMT(CXXDestroyExpr , Expr)
STMT(CXXConstructExpr , Expr)
-STMT(CXXExprWithCleanup , Expr)
+STMT(CXXExprWithTemporaries , Expr)
STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
// Obj-C Expressions.
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) {
}
}
-CXXExprWithCleanup::~CXXExprWithCleanup() {
+CXXExprWithTemporaries::~CXXExprWithTemporaries() {
delete[] Decls;
}
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;}