brintos

brintos / llvm-project-archived public Read only

0
0
Text · 678 B · 99c0e2d Raw
16 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -verify %s -fexceptions -fcxx-exceptions2 3struct A { struct X { virtual ~X() throw(Y); }; struct Y : X {}; };4struct B { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(Y); }; };5struct C { struct X { virtual void f() throw(Y); }; struct Y : X { void f() throw(); }; };6struct D { struct X { virtual void f() throw(Y); }; struct Y : X { void f() noexcept; }; };7struct E { struct Y; struct X { virtual Y &operator=(const Y&) throw(Y); }; struct Y : X {}; };8struct 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