aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-08 00:29:56 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-08 00:29:56 +0000
commite2dedf8f61b8f306f704781456b482eb61871e8e (patch)
treeebd7eef7bc402054a0cef7f050397f90816fc1ff
parentbd6fa3d032acd7eafc6c10827c41103df45beab7 (diff)
Add public placement-delete operators. These are automatically used if the allocation throws
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64056 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Stmt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index 61f8b9c9ad..3f76c95fb5 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -130,7 +130,11 @@ public:
void* operator new(size_t bytes, void* mem) throw() {
return mem;
}
-
+
+ void operator delete(void*, ASTContext& C) throw() { }
+ void operator delete(void*, ASTContext& C, unsigned alignment) throw() { }
+ void operator delete(void*, std::size_t) throw() { }
+
protected:
/// DestroyChildren - Invoked by destructors of subclasses of Stmt to
/// recursively release child AST nodes.