]> granicus.if.org Git - clang/commitdiff
AST: fix build since r152060
authorDylan Noblesmith <nobled@dreamwidth.org>
Wed, 7 Mar 2012 00:01:18 +0000 (00:01 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Wed, 7 Mar 2012 00:01:18 +0000 (00:01 +0000)
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

include/clang/AST/ASTContext.h
include/clang/AST/Attr.h

index 67876170e4ad38191eb08e918892a56b244410c7..3bdac2de9ac09aee88bb7045998ec5670a0e7d2e 100644 (file)
@@ -1914,6 +1914,9 @@ static inline Selector GetUnarySelector(StringRef name, ASTContext& Ctx) {
 /// 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.
index 55c9cb59e50e34bf9b8cffe53ec142e18e198b1e..ef1aa256626cd74483e1eeed5ee22b0fe37ca2d9 100644 (file)
@@ -40,19 +40,17 @@ namespace clang {
 
 // 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 {