blob: f29d65a9ced2bba874bedf8ab2c87f9cb971db37 [file] [log] [blame]
Dávid Bolvanskýabf3ca62021-04-22 20:35:29 +02001// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify
Julius49e7ef22022-09-14 19:34:16 +02002// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify -fms-compatibility
Dávid Bolvanskýabf3ca62021-04-22 20:35:29 +02003// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-user-provided-copy -verify
Julius49e7ef22022-09-14 19:34:16 +02004// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated-copy-with-user-provided-copy -verify -fms-compatibility
Dávid Bolvanskýabf3ca62021-04-22 20:35:29 +02005
6struct 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};
9
10void foo() {
11 A a1;
12 A a2(a1); // expected-note {{implicit copy constructor for 'A' first required here}}
13}