From: Douglas Gregor Date: Thu, 1 Jul 2010 14:21:35 +0000 (+0000) Subject: Add Sema test case for exception-specifiers implicitly added to destructors. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c05babe58ca0fe825a2c4d362f132f409217e39a;p=clang 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 --- 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}} +