aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-01 14:21:35 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-01 14:21:35 +0000
commitc05babe58ca0fe825a2c4d362f132f409217e39a (patch)
tree5a6b3d99c79f7a35b02470fb2f6a00cd0598b14a
parent1d110e05e0ff48c1c7a483d6b7fd094cdf28316a (diff)
Add Sema test case for exception-specifiers implicitly added to destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107395 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/except/except.spec/p14.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CXX/except/except.spec/p14.cpp b/test/CXX/except/except.spec/p14.cpp
new file mode 100644
index 0000000000..74284e51e5
--- /dev/null
+++ b/test/CXX/except/except.spec/p14.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fexceptions -verify %s
+struct A { };
+struct B { };
+
+struct X0 {
+ virtual ~X0() throw(A); // expected-note{{overridden virtual function is here}}
+};
+struct X1 {
+ virtual ~X1() throw(B); // expected-note{{overridden virtual function is here}}
+};
+struct X2 : public X0, public X1 { }; // expected-error 2{{exception specification of overriding function is more lax than base version}}
+