]> granicus.if.org Git - clang/commitdiff
Add Sema test case for exception-specifiers implicitly added to destructors.
authorDouglas Gregor <dgregor@apple.com>
Thu, 1 Jul 2010 14:21:35 +0000 (14:21 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 1 Jul 2010 14:21:35 +0000 (14:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107395 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/except/except.spec/p14.cpp [new file with mode: 0644]

diff --git a/test/CXX/except/except.spec/p14.cpp b/test/CXX/except/except.spec/p14.cpp
new file mode 100644 (file)
index 0000000..74284e5
--- /dev/null
@@ -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}}