17 lines · cpp
1// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify2// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify -fms-compatibility3// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-dtor -verify4// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-dtor -verify -fms-compatibility5// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-dtor -verify6// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-dtor -verify -fms-compatibility7 8class A {9public:10 ~A() = default; // expected-warning {{definition of implicit copy constructor for 'A' is deprecated because it has a user-declared destructor}}11};12 13void test() {14 A a1;15 A a2 = a1; // expected-note {{in implicit copy constructor for 'A' first required here}}16}17