Lines Matching full:enum
4 enum class E1 {
8 enum struct E2 {
23 enum E3 : char {
52 enum class E4 {
59 enum class E5 {
64 enum class E6 : bool {
69 enum E7 : bool {
76 enum E : T {
84 enum Incomplete1; // expected-error{{C++ forbids forward references}}
86 enum Complete1 : int;
89 enum class Complete2;
95 enum class Redeclare2; // expected-note{{previous declaration is here}} expected-note{{previous dec…
96 enum Redeclare2; // expected-error{{previously declared as scoped}}
97 enum Redeclare2; // expected-error{{previously declared as scoped}}
99 enum Redeclare3 : int; // expected-note{{previous declaration is here}} expected-note{{previous dec…
100 enum Redeclare3; // expected-error{{previously declared with fixed underlying type}}
101 enum Redeclare3; // expected-error{{previously declared with fixed underlying type}}
103 enum class Redeclare5;
104 enum class Redeclare5 : int; // ok
106 enum Redeclare6 : int; // expected-note{{previous declaration is here}} expected-note{{previous d…
107 enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}}
108 enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}}
110 enum class Redeclare7; // expected-note{{previous declaration is here}} expected-note{{prev…
111 enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}}
112 enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}}
114 enum : long {
118 enum : long x; // expected-error{{unnamed enumeration must be a definition}}
121 enum class scoped_enum { yes, no, maybe }; in PR9333()
127 enum class X : unsigned { value };
139 enum A : Atype;
141 enum ns::A : ns::Atype {
148 enum A : unsigned;
151 enum A::b; // expected-error {{incomplete type 'test6::A' named in nested name specifier}}
152 // expected-error@-1{{forward declaration of enum cannot have a nested name specifier}}
162 enum class test1 { owner_dead = val, };
166 enum class E *x0a; // expected-error {{reference to enumeration must use 'enum' not 'enum class'}}
167 enum E2 *x0b; // OK
168 enum class E { a, b };
169 enum E x1 = E::a; // ok
170 …enum class E x2 = E::a; // expected-error {{reference to enumeration must use 'enum' not 'enum cla…
172 enum F { a, b };
173 enum F y1 = a; // ok
174 …enum class F y2 = a; // expected-error {{reference to enumeration must use 'enum' not 'enum class'…
177 …friend enum class E; // expected-error {{reference to enumeration must use 'enum' not 'enum class'…
178 … // expected-warning@-1 {{elaborated enum specifier cannot be declared as a friend}}
179 // expected-note@-2 {{remove 'enum class' to befriend an enum}}
180 …friend enum class F; // expected-error {{reference to enumeration must use 'enum' not 'enum class'…
181 … // expected-warning@-1 {{elaborated enum specifier cannot be declared as a friend}}
182 // expected-note@-2 {{remove 'enum class' to befriend an enum}}
184 …friend enum G {}; // expected-error {{forward reference}} expected-error {{cannot define a type in…
185 … // expected-warning@-1 {{elaborated enum specifier cannot be declared as a friend}}
186 // expected-note@-2 {{remove 'enum' to befriend an enum}}
187 …friend enum class H {}; // expected-error {{forward reference}} expected-error {{cannot define a t…
188 … // expected-warning@-1 {{elaborated enum specifier cannot be declared as a friend}}
189 // expected-note@-2 {{remove 'enum' to befriend an enum}}
190 …friend enum I : int {}; // expected-error {{forward reference}} expected-error {{cannot define a t…
191 … // expected-warning@-1 {{elaborated enum specifier cannot be declared as a friend}}
192 // expected-note@-2 {{remove 'enum' to befriend an enum}}
194 enum A : int;
198 enum S::A : int {};
200 enum class B;
203 enum class N2764::B {};
206 template<typename E> struct Enum { struct
207 Enum() : m_e(E::Last) {} in Enum() argument
211 enum eCOLORS { Last };
212 Enum<eCOLORS> e;
216 enum class E { e = (struct S*)0 == (struct S*)0 };
222 enum A : int; // expected-note {{here}}
223 enum class B; // expected-note {{here}}
224 enum class C : int; // expected-note {{here}}
225 enum class D : int; // expected-note {{here}}
227 …template<typename T> enum S<T>::A { a }; // expected-error {{previously declared with fixed underl…
228 …template<typename T> enum class S<T>::B : char { b }; // expected-error {{redeclared with differen…
229 template<typename T> enum S<T>::C : int { c }; // expected-error {{previously declared as scoped}}
230 …template<typename T> enum class S<T>::D : char { d }; // expected-error {{redeclared with differen…
235 enum class ET : T; // expected-note 2{{here}}
236 enum class Eint : int; // expected-note 2{{here}}
238 template<> enum class S<int>::ET : int {};
239 template<> enum class S<char>::ET : short {}; // expected-error {{different underlying type}}
240 template<> enum class S<int>::Eint : short {}; // expected-error {{different underlying type}}
241 template<> enum class S<char>::Eint : int {};
243 …template<typename T> enum class S<T>::ET : int {}; // expected-error {{different underlying type '…
244 …template<typename T> enum class S<T>::Eint : T {}; // expected-error {{different underlying type '…
254 enum E : int; in f()
255 enum E : T; // expected-note {{here}} in f()
257 enum E : int { e }; // expected-error {{different underlying}} in f()
265 enum class E : int; in g()
266 enum class E : T; // expected-note {{here}} in g()
268 enum class E : int { e }; // expected-error {{different underlying}} in g()
279 enum class E { C };
286 enum class E : T;
287 enum class E2 : T;
290 template<typename T> enum class A<T>::B::E { e };
293 struct B { enum class E; };
294 template<typename T> enum class B::E { e }; // expected-error {{enumeration cannot be a template}}
298 enum class A;
303 enum class A { A };
308 enum class B : bool { F, T };
318 enum class E { a };
324 enum E::E {}; // expected-error {{no enum named 'E'}}
333 enum class E { a };
341 enum C { R=-1, G, B };
342 enum B { F = (enum C) -1, T}; // this should compile cleanly, it used to assert.
347 enum class A;
348 enum class B;