Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / deprecated-copy-with-user-provided-copy.cpp
blobf29d65a9ced2bba874bedf8ab2c87f9cb971db37
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-with-user-provided-copy -verify
4 // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-user-provided-copy -verify -fms-compatibility
6 struct A {
7 A &operator=(const A &); // expected-warning {{definition of implicit copy constructor for 'A' is deprecated because it has a user-provided copy assignment operator}}
8 };
10 void foo() {
11 A a1;
12 A a2(a1); // expected-note {{implicit copy constructor for 'A' first required here}}