Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / special / class.dtor / p3.cpp
blob6f4d5c7f31842ab939ad88d9e3d190494a737847
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.
5 namespace DR1492 {
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 {
13 T t;
14 ~C(); // expected-note {{here}}
16 template<typename T> C<T>::~C() noexcept {} // expected-error {{does not match previous}}