Implement a hack to work around the changing exception specification of operator new in C++0x.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127688 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/except/except.spec/p3.cpp b/test/CXX/except/except.spec/p3.cpp
index e751f55..10e027b 100644
--- a/test/CXX/except/except.spec/p3.cpp
+++ b/test/CXX/except/except.spec/p3.cpp
@@ -92,3 +92,14 @@
extern void (*r21)() throw(int); // expected-note {{previous declaration}}
extern void (*r21)() noexcept(true); // expected-error {{does not match}}
+
+
+// As a very special workaround, we allow operator new to match no spec
+// with a throw(bad_alloc) spec, because C++0x makes an incompatible change
+// here.
+namespace std { class bad_alloc {}; }
+void* operator new(unsigned long) throw(std::bad_alloc);
+void* operator new(unsigned long);
+void* operator new[](unsigned long) throw(std::bad_alloc);
+void* operator new[](unsigned long);
+