xref: /llvm-project/clang/test/SemaCXX/deprecated-copy-with-dtor.cpp (revision 49e7ef2c09facd722a29a5ad96a7f8f16e362b28)
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
7 
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}}
11 };
12 
test()13 void test() {
14   A a1;
15   A a2 = a1; // expected-note {{in implicit copy constructor for 'A' first required here}}
16 }
17