1 // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -verify %s
3 // The exception specification of a destructor declaration is matched *before*
4 // the exception specification adjustment occurs.
6 struct A
{ ~A(); }; // expected-note {{here}}
7 A::~A() noexcept
{} // expected-warning {{previously declared with an implicit exception specification}}
9 struct B
{ ~B() noexcept
; }; // expected-note {{here}}
10 B::~B() {} // expected-warning {{previously declared with an explicit exception specification}}
12 template<typename T
> struct C
{
14 ~C(); // expected-note {{here}}
16 template<typename T
> C
<T
>::~C() noexcept
{} // expected-error {{does not match previous}}