// RUN: %clang_cc1 -std=c++11 %s -verify -fcxx-exceptions
// We permit overriding an implicit exception specification with an explicit one
// as an extension, for compatibility with existing code.
;
void // expected-error {{does not match previous}}
// expected-warning {{function previously declared with an implicit exception specification redeclared with an explicit exception specification}}
void S::operator delete noexcept // expected-warning {{function previously declared with an implicit exception specification redeclared with an explicit exception specification}}
;
void // expected-error {{missing exception specification 'noexcept'}}
// expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}}
void T::operator delete // expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}}
// The extension does not extend to function templates.
;
U<T>::~ noexcept // expected-error {{exception specification in declaration does not match previous declaration}}
void U<T>::operator delete noexcept // expected-error {{exception specification in declaration does not match previous declaration}}
// Make sure this restriction interacts properly with __attribute__((noreturn))
void throw;
void throw;