AST: fix build since r152060
The declarations of the operators no longer matched.
The definitions in ASTContext.h had 'throw()' removed,
but it was still present in Attr.h.
Somehow the buildbots missed this. clang merely warns about
a missing 'throw()' specification and suggested a Fix-It adding
it back, but gcc 4.5 is not so forgiving and gives an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152167 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 6787617..3bdac2d 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -1914,6 +1914,9 @@
/// This placement form of operator new uses the ASTContext's allocator for
/// obtaining memory.
///
+/// IMPORTANT: These are also declared in clang/AST/Attr.h! Any changes here
+/// need to also be made there.
+///
/// We intentionally avoid using a nothrow specification here so that the calls
/// to this operator will not perform a null check on the result -- the
/// underlying allocator never returns null pointers.
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index 55c9cb5..ef1aa25 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -40,19 +40,17 @@
// Defined in ASTContext.h
void *operator new(size_t Bytes, const clang::ASTContext &C,
- size_t Alignment = 16) throw ();
+ size_t Alignment = 16);
// FIXME: Being forced to not have a default argument here due to redeclaration
// rules on default arguments sucks
void *operator new[](size_t Bytes, const clang::ASTContext &C,
- size_t Alignment) throw ();
+ size_t Alignment);
// It is good practice to pair new/delete operators. Also, MSVC gives many
// warnings if a matching delete overload is not declared, even though the
// throw() spec guarantees it will not be implicitly called.
-void operator delete(void *Ptr, const clang::ASTContext &C, size_t)
- throw ();
-void operator delete[](void *Ptr, const clang::ASTContext &C, size_t)
- throw ();
+void operator delete(void *Ptr, const clang::ASTContext &C, size_t);
+void operator delete[](void *Ptr, const clang::ASTContext &C, size_t);
namespace clang {