Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245.

llvm-svn: 61335
This commit is contained in:
Sebastian Redl 2008-12-22 17:51:10 +00:00
parent c72502308d
commit 04253537dc
1 changed files with 2 additions and 2 deletions

View File

@ -179,10 +179,10 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty, bool isLvalue) {
}
void Sema::DeleteExpr(ExprTy *E) {
delete static_cast<Expr*>(E);
static_cast<Expr*>(E)->Destroy(Context);
}
void Sema::DeleteStmt(StmtTy *S) {
delete static_cast<Stmt*>(S);
static_cast<Stmt*>(S)->Destroy(Context);
}
/// ActOnEndOfTranslationUnit - This is called at the very end of the