[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / deprecated-copy-with-dtor.cpp
blob463b1c895009cf7b08a18c035103b610a4b67dc3
1 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify
2 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-dtor -verify
3 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-dtor -verify
5 class A {
6 public:
7 ~A() = default; // expected-warning {{definition of implicit copy constructor for 'A' is deprecated because it has a user-declared destructor}}
8 };
10 void test() {
11 A a1;
12 A a2 = a1; // expected-note {{in implicit copy constructor for 'A' first required here}}