1 | // RUN: %clang_cc1 -std=c++11 -verify %s -fexceptions -fcxx-exceptions |
2 | |
3 | struct A { struct X { virtual ~X() throw(Y); }; struct Y : X {}; }; |
4 | struct B { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(Y); }; }; |
5 | struct C { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(); }; }; |
6 | struct D { struct X { virtual void f() throw(Y); }; struct Y : X { void f() noexcept; }; }; |
7 | struct E { struct Y; struct X { virtual Y &operator=(const Y&) throw(Y); }; struct Y : X {}; }; |
8 | struct F { |
9 | struct X { |
10 | virtual void f() throw(Y); // expected-note {{here}} |
11 | }; |
12 | struct Y : X { |
13 | void f() throw(int); // expected-error {{more lax}} |
14 | }; |
15 | }; |
16 | |