KnownFunctionIDs[ id_vprintf ] = &IT.get("vprintf");
}
+void Sema::DeleteExpr(ExprTy *E) {
+ delete static_cast<Expr*>(E);
+}
+void Sema::DeleteStmt(StmtTy *S) {
+ delete static_cast<Stmt*>(S);
+}
+
//===----------------------------------------------------------------------===//
// Helper functions.
//===----------------------------------------------------------------------===//
const std::string &Msg1, const std::string &Msg2,
SourceRange R1, SourceRange R2);
+ virtual void DeleteExpr(ExprTy *E);
+ virtual void DeleteStmt(StmtTy *S);
+
//===--------------------------------------------------------------------===//
// Type Analysis / Processing: SemaType.cpp.
//
typedef ActionResult<1> StmtResult;
typedef ActionResult<2> TypeResult;
+ /// Deletion callbacks - Since the parser doesn't know the concrete types of
+ /// the AST nodes being generated, it must do callbacks to delete objects when
+ /// recovering from errors.
+ virtual void DeleteExpr(ExprTy *E) {}
+ virtual void DeleteStmt(StmtTy *E) {}
+
//===--------------------------------------------------------------------===//
// Declaration Tracking Callbacks.
//===--------------------------------------------------------------------===//