// RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s
// If T is the name of a class, then each of the following shall have
// a name different from T:
// - every static data member of class T;
;
// - every member function of class T
;
// - every member of class T that is itself a type;
;
;
;
;
// - every member template of class T
;
;
;
;
// - every enumerator of every member of class T that is an unscoped enumerated type; and
;
;
// - every member of every anonymous union that is a member of class T.
;
// This includes such things inherited from base classes.
;
;
; // expected-error {{member 'D0' has the same name as its class}}
; // expected-error {{member 'Da' has the same name as its class}}
; // expected-error {{member 'D1' has the same name as its class}}
; // expected-error {{member 'D1a' has the same name as its class}}
; // expected-error {{member 'D2' has the same name as its class}}
; // expected-error {{member 'D2a' has the same name as its class}}
; // expected-error {{member 'D2b' has the same name as its class}}
; // expected-error {{member 'D2c' has the same name as its class}}
; // expected-error {{member 'D2d' has the same name as its class}}
; // expected-error {{member 'D2e' has the same name as its class}}
; // expected-error {{member 'D4' has the same name as its class}}
;
Dtemplate<B> ok;
Dtemplate<B2> error; // expected-note {{in instantiation of}}
;
;