1 // RUN: %clang_cc1 -fsyntax-only -Wall -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -Wself-assign -verify %s
3 // RUN: %clang_cc1 -fsyntax-only -Wself-assign-overloaded -verify %s
4 // RUN: %clang_cc1 -fsyntax-only -Wall -Wno-self-assign-overloaded -DSILENCE -verify %s
5 // RUN: %clang_cc1 -fsyntax-only -Wself-assign -Wno-self-assign-overloaded -DSILENCE -verify %s
6 // RUN: %clang_cc1 -fsyntax-only -Wself-assign-overloaded -Wno-self-assign-overloaded -DSILENCE -verify %s
7
8 struct S {};
9
f()10 void f() {
11 S a;
12 #ifndef SILENCE
13 a = a; // expected-warning{{explicitly assigning}}
14 #else
15 // expected-no-diagnostics
16 a = a;
17 #endif
18 }
19