Home
last modified time | relevance | path

Searched full:enum (Results 1 – 25 of 4228) sorted by relevance

12345678910>>...170

/llvm-project/clang-tools-extra/clangd/unittests/tweaks/
H A DPopulateSwitchTests.cpp31 R""(enum Enum {}; ^switch ((Enum)0) {})"", in TEST_F()
37 R""(enum Enum {A,B}; ^switch (A) {case A:break;case B:break;})"", in TEST_F()
44 enum class Enum {A,B}; in TEST_F()
45 ^switch (Enum::A) {case Enum::A:break;case Enum::B:break;} in TEST_F()
53 enum class Enum {A,B}; in TEST_F()
54 ^switch (Enum::A) {default:break;} in TEST_F()
62 enum class Enum {A,B}; in TEST_F()
63 ^switch (Enum::A) {case Enum::A ... Enum::B:break;} in TEST_F()
71 enum class Enum {A,B}; in TEST_F()
72 template<Enum Value> in TEST_F()
[all …]
/llvm-project/clang/test/SemaCXX/
H A Denum-scoped.cpp4 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;
[all …]
H A Dcxx20-using-enum.cpp5 // p1099 'using enum ELABORATED-ENUM-SPECIFIER ;'
9 enum A { a, // expected-note{{declared here}}
13 enum class D : int;
14 enum class D { d,
17 enum class D : int;
20 using enum Bob::A;
24 using enum Bob::B; // expected-error{{unknown type name B}}
28 using enum Bob::C; // expected-error{{'Bob::C' is not an enumerated type}}
38 using enum Bob::D;
45 using enum A_t; in DR2621()
[all …]
H A Denum.cpp7 enum E { // expected-note{{previous definition is here}}
12 enum E; // expected-warning{{redeclaration of already-defined enum 'E' is a GNU extension}}
22 typedef enum Foo {
34 enum e1 (*bar)(void); // expected-error{{ISO C++ forbids forward references to 'enum' types}}
37 enum e1 { YES, NO }; in badfunc()
39 static enum e1 badfunc(struct s1 *q) {
43 enum e2; // expected-error{{ISO C++ forbids forward references to 'enum' type
[all...]
H A Dattr-declspec-ignored.cpp11 …n"))) __attribute__((aligned)) enum D {D}; // expected-warning{{attribute 'visibility' is ignored…
12 …// expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to t…
13 …)) __attribute__((aligned)) enum class EC {}; // expected-warning{{attribute 'visibility' is igno…
14 …// expected-warning{{attribute 'aligned' is ignored, place it after "enum class" to apply attribut…
15 …)) __attribute__((aligned)) enum struct ES {}; // expected-warning{{attribute 'visibility' is ign…
16 …// expected-warning{{attribute 'aligned' is ignored, place it after "enum struct" to apply attribu…
26 …n"))) __attribute__((aligned)) enum D {D}; // expected-warning{{attribute 'visibility' is ignored…
27 …// expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to t…
28 …)) __attribute__((aligned)) enum class EC {}; // expected-warning{{attribute 'visibility' is igno…
29 …// expected-warning{{attribute 'aligned' is ignored, place it after "enum class" to apply attribut…
[all …]
/llvm-project/clang-tools-extra/test/clang-move/
H A Dmove-enum-decl.cpp1 // RUN: mkdir -p %T/move-enum
2 // RUN: cp %S/Inputs/enum.h %T/move-enum/enum.h
3 // RUN: echo '#include "enum.h"' > %T/move-enum/enum.cpp
4 // RUN: cd %T/move-enum
7 // Test moving enum declarations.
9 …c=%T/move-enum/new_test.cpp -new_header=%T/move-enum/new_test.h -old_cc=%T/move-enum/enum.cpp -old…
10 // RUN: FileCheck -input-file=%T/move-enum/new_test.h -check-prefix=CHECK-NEW-TEST-H-CASE1 %s
11 // RUN: FileCheck -input-file=%T/move-enum/enum.h -check-prefix=CHECK-OLD-TEST-H-CASE1 %s
14 // CHECK-NEW-TEST-H-CASE1-NEXT: enum E1 { Green, Red };
17 // CHECK-OLD-TEST-H-CASE1-NOT: enum E1 { Green, Red };
[all …]
/llvm-project/clang/test/Index/
H A Dcomplete-type-factors.m3 enum Color {
7 enum Priority {
12 int func1(enum Color);
13 enum Priority func2(int);
15 enum Priority test1(enum Priority priority, enum Color color, int integer) {
17 enum Color c = color;
20 void (^block)(enum Color, int);
26 + (void)method:(enum Color)color priority:(enum Priority)priority;
27 - (void)method:(enum Color)color priority:(enum Priority)priority;
36 // CHECK-CC1: EnumConstantDecl:{ResultType enum Color}{TypedText Blue} (32)
[all …]
/llvm-project/lldb/test/Shell/SymbolFile/PDB/
H A Denums-layout.test3 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM %s
4 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CONST-ENUM %s
5 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=EMPTY-ENUM %s
6 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=UCHAR-ENUM %s
7 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CLASS-ENUM %s
8 RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=STRUCT-ENUM %s
10 ; FIXME: PDB does not have information about scoped enumeration (Enum class) so the
13 ENUM: Type{{.*}} , name = "Enum", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:19…
14 ENUM-NEXT: RED,
15 ENUM-NEXT: GREEN,
[all …]
/llvm-project/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/
H A Dp4.cpp3 enum class E;
7 enum class F;
12 …friend enum A<T>::F; // expected-error {{elaborated enum specifier cannot be declared as a friend}}
13 // expected-note@-1 {{remove 'enum' to befriend an enum}}
17 …friend enum A<int>::F; // expected-error {{elaborated enum specifier cannot be declared as a frien…
18 // expected-note@-1 {{remove 'enum' to befriend an enum}}
20 enum class G;
22 friend enum E; // expected-error {{elaborated enum specifier cannot be declared as a friend}}
23 // expected-note@-1 {{remove 'enum' to befriend an enum}}
28 friend enum T::G; // expected-error {{elaborated enum specifier cannot be declared as a friend}}
[all …]
/llvm-project/clang/test/ARCMT/
H A Dobjcmt-ns-macros.m18 #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
19 #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
22 enum {
28 enum {
39 typedef enum {
47 typedef enum {
57 enum {
65 typedef enum {
72 enum {
78 enum {
[all …]
/llvm-project/clang/test/Sema/
H A Denum.c3 enum e {A,
7 enum f { a = -2147483648, b = 2147483647 }; // ok.
9 enum g { // too negative
12 enum h { e = -2147483648, // too pos
18 enum x // expected-warning {{enumeration values exceed range of largest integer}}
23 return sizeof(enum e) ; in test()
26 enum gccForwardEnumExtension ve; // expected-warning{{ISO C forbids forward references to 'enum' types}} \
27 // expected-error{{tentative definition has type 'enum gccForwardEnumExtension' that is never completed}} \
28 // expected-note{{forward declaration of 'enum gccForwardEnumExtensio
[all...]
H A Dswitch.c1 // RUN: %clang_cc1 -fsyntax-only -verify -Wswitch-enum -Wcovered-switch-default -triple x86_64-linux-gnu %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -Wswitch-enum -Wcovered-switch-default -triple x86_64-linux-gnu %s -fexperimental-new-constant-interpreter in f()
97 enum { in test7()
113 case 3: // expected-warning{{case value not in enumerated type 'enum (unnamed enum}} in test7()
119 case 3 ... //expected-warning{{case value not in enumerated type 'enum (unnamed enum}} in test7()
120 4: //expected-warning{{case value not in enumerated type 'enum (unnamed enum}} in test7()
128 case 0 ... 2: //expected-warning{{case value not in enumerated type 'enum (unname in test7()
[all...]
H A Denum-enum-conversion.c5 enum SE1 { N1 = -1 };
6 enum SE2 { N2 = -2 };
8 enum UE1 { P1 };
9 enum UE2 { P2 };
11 enum UE2 f1(enum UE1 E) { in f1()
12 …-warning {{implicit conversion from enumeration type 'enum UE1' to different enumeration type 'enu… in f1()
15 enum SE1 f2(enum UE1 E) { in f2()
16 …-warning {{implicit conversion from enumeration type 'enum UE1' to different enumeration type 'enu… in f2()
19 enum UE1 f3(enum SE1 E) { in f3()
20 …-warning {{implicit conversion from enumeration type 'enum SE1' to different enumeration type 'enu… in f3()
[all …]
H A Denum-sign-conversion.c6 enum X { A,B,C};
7 int f(enum X x) { in f()
8 return x; // unsigned-warning {{implicit conversion changes signedness: 'enum X' to 'int'}} in f()
11 enum SE1 { N1 = -1 }; // Always a signed underlying type.
12 enum E1 { P1 }; // Unsigned underlying type except on Windows.
14 // ensure no regression with enum to sign (related to enum-enum-conversion.c)
15 int f1(enum E1 E) { in f1()
16 return E; // unsigned-warning {{implicit conversion changes signedness: 'enum E1' to 'int'}} in f1()
19 enum E1 f2(int E) { in f2()
20 return E; // unsigned-warning {{implicit conversion changes signedness: 'int' to 'enum E1'}} in f2()
[all …]
H A Dtautological-unsigned-enum-zero-compare.cpp2 // RUN: -Wtautological-unsigned-enum-zero-compare \
5 // RUN: -Wtautological-unsigned-enum-zero-compare \
17 enum A { A_foo = 0, A_bar, }; in main()
18 enum A a; in main()
20 enum B : unsigned { B_foo = 0, B_bar, }; in main()
21 enum B b; in main()
23 enum C : signed { C_foo = 0, C_bar, }; in main()
24 enum C c; in main()
26 if (a < 0) // unsigned-warning {{comparison of unsigned enum expression < 0 is always false}} in main()
32 if (0 <= a) // unsigned-warning {{comparison of 0 <= unsigned enum expression is always true}} in main()
[all …]
H A Doutof-range-enum-constant-compare.c7 enum A { A_a = 2 }; in main()
8 enum A a; in main()
16 …ected-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always true}} in main()
18 …ected-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always true}} in main()
20 …cted-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always false}} in main()
22 …cted-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always false}} in main()
24 …ected-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always true}} in main()
26 …ected-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always true}} in main()
28 …cted-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always false}} in main()
30 …cted-warning {{comparison of constant 4294967296 with expression of type 'enum A' is always false}} in main()
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/performance/
H A Denum-size.cpp1 // RUN: %check_clang_tidy -std=c++17-or-later %s performance-enum-size %t -- \
2 // RUN: -config="{CheckOptions: {performance-enum-size.EnumIgnoreList: '::IgnoredEnum;IgnoredSeco…
14 enum class Value
15enum 'Value' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, cons…
21 enum class EnumClass : std::int16_t
22enum 'EnumClass' uses a larger base type ('std::int16_t' (aka 'short'), size: 2 bytes) than necess…
27 enum EnumWithType : std::uint16_t
28enum 'EnumWithType' uses a larger base type ('std::uint16_t' (aka 'unsigned short'), size: 2 bytes…
34 enum EnumWithNegative
35enum 'EnumWithNegative' uses a larger base type ('int', size: 4 bytes) than necessary for its valu…
[all …]
/llvm-project/clang/test/Analysis/
H A Denum-cast-out-of-range.c6 // expected-note@+1 + {{enum declared here}}
7 enum En_t {
16enum En_t Below = (enum En_t)(-5); // expected-warning {{not in the valid range of values for '… in unscopedUnspecifiedCStyle()
18 enum En_t NegVal1 = (enum En_t)(-4); // OK. in unscopedUnspecifiedCStyle()
19 enum En_t NegVal2 = (enum En_t)(-3); // OK. in unscopedUnspecifiedCStyle()
20enum En_t InRange1 = (enum En_t)(-2); // expected-warning {{not in the valid range of values for '… in unscopedUnspecifiedCStyle()
22enum En_t InRange2 = (enum En_t)(-1); // expected-warning {{not in the valid range of values for '… in unscopedUnspecifiedCStyle()
24enum En_t InRange3 = (enum En_t)(0); // expected-warning {{not in the valid range of values for '… in unscopedUnspecifiedCStyle()
26 enum En_t PosVal1 = (enum En_t)(1); // OK. in unscopedUnspecifiedCStyle()
27 enum En_t PosVal2 = (enum En_t)(2); // OK. in unscopedUnspecifiedCStyle()
[all …]
/llvm-project/flang/include/flang/Decimal/
H A Ddecimal.h33 enum ConversionResultFlags {
45 enum ConversionResultFlags flags;
53 enum DecimalConversionFlags {
70 DecimalConversionFlags, int digits, enum FortranRounding rounding,
74 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
77 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
80 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
83 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
86 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
89 char *, size_t, enum DecimalConversionFlags, int, enum FortranRounding,
[all …]
/llvm-project/clang/test/AST/
H A Dast-print-enum-decl.c18 // PRINT-NEXT: enum in defFirst()
27 enum __attribute__((aligned(16))) __attribute__((deprecated(""))) T { in defFirst()
31 // PRINT-NEXT: enum T *p1; in defFirst()
32 enum T *p1; // expected-warning {{'T' is deprecated}} in defFirst()
37 // PRINT-NEXT: enum __attribute__((aligned(16))) T *p0; in defLast()
38 enum __attribute__((aligned(16))) T *p0; in defLast()
40 // PRINT-NEXT: enum __attribute__((deprecated(""))) T { in defLast()
46 enum __attribute__((deprecated(""))) T { E0, E1 } *p1; in defLast()
51 // PRINT-NEXT: enum __attribute__((deprecated(""))) T *p0; in defMiddle()
54 enum __attribute__((deprecated(""))) T *p0; in defMiddle()
[all …]
/llvm-project/polly/lib/External/isl/include/isl/
H A Dmap.h35 enum isl_dim_type type);
41 isl_size isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type);
56 __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s);
58 enum isl_dim_type type);
60 enum isl_dim_type type);
62 enum isl_dim_type type);
64 enum isl_dim_type type, const char *s);
66 enum isl_dim_type type, unsigned pos);
68 enum isl_dim_type type, unsigned pos);
70 enum isl_dim_type type, unsigned pos);
[all …]
H A Dset.h33 enum isl_dim_type type);
39 isl_size isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type);
63 enum isl_dim_type type, unsigned pos);
66 enum isl_dim_type type, unsigned pos, const char *s);
68 enum isl_dim_type type, unsigned pos);
70 enum isl_dim_type type, unsigned pos);
72 enum isl_dim_type type, unsigned pos, const char *s);
75 enum isl_dim_type type, unsigned pos);
79 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
81 enum isl_dim_type type, unsigned pos);
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dnon-zero-enum-to-bool-conversion-cpp11.cpp1 // RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-non-zero-enum-to-bool-conversion %t
5 enum class EStatusC : char {
13 …usC' into 'bool' will always return 'true', enum doesn't have a zero-value enumerator [bugprone-no… in testEnumConversion()
17 enum class EStatusS : short {
25 …usS' into 'bool' will always return 'true', enum doesn't have a zero-value enumerator [bugprone-no… in testEnumConversion()
30 enum class EStatusI : int {
38 …usI' into 'bool' will always return 'true', enum doesn't have a zero-value enumerator [bugprone-no… in testEnumConversion()
42 enum class EStatus {
50 …tus' into 'bool' will always return 'true', enum doesn't have a zero-value enumerator [bugprone-no… in testEnumConversion()
56 enum EResult : int {
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/
H A Dmacro-to-enum.cpp1 …eck_clang_tidy -std=c++14-or-later %s modernize-macro-to-enum %t -- -- -I%S/Inputs/macro-to-enum -…
5 #include "modernize-macro-to-enum.h"
27 // CHECK-MESSAGES: :[[@LINE-12]]:1: warning: replace macro with enum [modernize-macro-to-enum]
28 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR1' defines an integral constant; prefer an enum instead
29 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR2' defines an integral constant; prefer an enum instead
30 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR3' defines an integral constant; prefer an enum instead
31 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR4' defines an integral constant; prefer an enum instead
32 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR5' defines an integral constant; prefer an enum instead
33 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR6' defines an integral constant; prefer an enum instead
34 …SAGES: :[[@LINE-13]]:9: warning: macro 'EXPR7' defines an integral constant; prefer an enum instead
[all …]
/llvm-project/llvm/include/llvm/Frontend/OpenMP/
H A DOMPConstants.h26 enum class InternalControlVar {
27 #define ICV_DATA_ENV(Enum, ...) Enum, argument
31 #define ICV_DATA_ENV(Enum, ...) \ argument
32 constexpr auto Enum = omp::InternalControlVar::Enum;
35 enum class ICVInitValue {
36 #define ICV_INIT_VALUE(Enum, Name) Enum, argument
40 #define ICV_INIT_VALUE(Enum, Name) \ argument
41 constexpr auto Enum = omp::ICVInitValue::Enum;
45 enum class RuntimeFunction {
46 #define OMP_RTL(Enum, ...) Enum, argument
[all …]

12345678910>>...170