[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CXX / except / except.spec / p5-delayed.cpp
blob99c0e2de31a99d547913785bb8d00e7a39374a31
1 // RUN: %clang_cc1 -std=c++11 -verify %s -fexceptions -fcxx-exceptions
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}}
12 struct Y : X {
13 void f() throw(int); // expected-error {{more lax}}