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