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