xref: /aosp_15_r20/external/clang/test/CXX/except/except.spec/p5-delayed.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -std=c++11 -verify %s -fexceptions -fcxx-exceptions
2*67e74705SXin Li 
3*67e74705SXin Li struct A { struct X { virtual ~X() throw(Y); }; struct Y : X {}; };
4*67e74705SXin Li struct B { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(Y); }; };
5*67e74705SXin Li struct C { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(); }; };
6*67e74705SXin Li struct D { struct X { virtual void f() throw(Y); }; struct Y : X { void f() noexcept; }; };
7*67e74705SXin Li struct E { struct Y; struct X { virtual Y &operator=(const Y&) throw(Y); }; struct Y : X {}; };
8*67e74705SXin Li struct F {
9*67e74705SXin Li   struct X {
10*67e74705SXin Li     virtual void f() throw(Y); // expected-note {{here}}
11*67e74705SXin Li   };
12*67e74705SXin Li   struct Y : X {
13*67e74705SXin Li     void f() throw(int); // expected-error {{more lax}}
14*67e74705SXin Li   };
15*67e74705SXin Li };
16