| // RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only %s -fcxx-exceptions -fassume-nothrow-exception-dtor -verify |
| template <typename T> struct A { A(); ~A(); }; |
| struct B { ~B() noexcept(false); }; |
| struct C { virtual void f(); } c; |
| struct MoveOnly { MoveOnly(); MoveOnly(MoveOnly&&); }; |
| throw B(); // expected-error{{cannot throw object of type 'B' with a potentially-throwing destructor}} |
| throw B1(); // expected-error{{cannot throw object of type 'B1' with a potentially-throwing destructor}} |
| throw b2; // expected-error{{cannot throw object of type 'B2' with a potentially-throwing destructor}} |