Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / deprecated-copy-with-dtor.cpp
blobb274d8cb3afd1d74cf16f70a4d061246932a53bd
1 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify
2 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify -fms-compatibility
3 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-dtor -verify
4 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-dtor -verify -fms-compatibility
5 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-dtor -verify
6 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-dtor -verify -fms-compatibility
8 class A {
9 public:
10 ~A() = default; // expected-warning {{definition of implicit copy constructor for 'A' is deprecated because it has a user-declared destructor}}
13 void test() {
14 A a1;
15 A a2 = a1; // expected-note {{in implicit copy constructor for 'A' first required here}}