[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / clang / test / CodeCompletion / enum-switch-case.c
blob1e24b68d921747f525f6669e93d7caf520c177ad
1 enum Color {
2 Red,
3 Orange,
4 Yellow,
5 Green,
6 Blue,
7 Indigo,
8 Violet
9 };
11 void test(enum Color color) {
12 switch (color) {
13 case Red:
14 break;
16 case Yellow:
17 break;
19 case Green:
20 break;
23 unsigned c2;
24 switch (c2) {
25 case
28 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-9):10 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
29 // CHECK-CC1: Blue
30 // CHECK-CC1-NEXT: Green
31 // CHECK-CC1-NEXT: Indigo
32 // CHECK-CC1-NEXT: Orange
33 // CHECK-CC1-NEXT: Violet
35 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-10):10 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
36 // CHECK-CC2: COMPLETION: Blue : [#enum Color#]Blue
37 // CHECK-CC2-NEXT: COMPLETION: c2 : [#unsigned int#]c2
38 // CHECK-CC2-NEXT: COMPLETION: color : [#enum Color#]color
39 // CHECK-CC2-NEXT: COMPLETION: Green : [#enum Color#]Green
40 // CHECK-CC2-NEXT: COMPLETION: Indigo : [#enum Color#]Indigo
41 // CHECK-CC2-NEXT: COMPLETION: Orange : [#enum Color#]Orange
42 // CHECK-CC2-NEXT: COMPLETION: Red : [#enum Color#]Red
43 // CHECK-CC2-NEXT: COMPLETION: Pattern : [#size_t#]sizeof(<#expression-or-type#>)
44 // CHECK-CC2-NEXT: COMPLETION: Violet : [#enum Color#]Violet
45 // CHECK-CC2-NEXT: COMPLETION: Yellow : [#enum Color#]Yellow