p5-delayed.cpp 678 B

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