1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3// In addition, if class T has a user-declared constructor (12.1), 4// every non-static data member of class T shall have a name different 5// from T. 6 7struct X0 { 8 int X0; // okay 9}; 10 11struct X1 { 12 int X1; // expected-note{{hidden by a non-type declaration of 'X1' here}} 13 X1(); // expected-error{{must use 'struct' tag to refer to type 'X1' in this scope}} \ 14 // expected-error{{expected member name or ';' after declaration specifiers}} 15}; 16 17struct X2 { 18 X2(); 19 float X2; // expected-error{{member 'X2' has the same name as its class}} 20}; 21