xref: /llvm-project/clang/test/CodeCompletion/enum-switch-case.c (revision 34546ce43d3d89c102a99882ae3825423a28abcd)
1 enum Color {
2   Red,
3   Orange,
4   Yellow,
5   Green,
6   Blue,
7   Indigo,
8   Violet
9 };
10 
11 void test(enum Color color) {
12   switch (color) {
13     case Red:
14       break;
15 
16     case Yellow:
17       break;
18 
19     case Green:
20       break;
21 
22     // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:10 %s -o - | FileCheck -check-prefix=CC1 %s
23     // CHECK-CC1: Blue : 0
24     // CHECK-CC1-NEXT: Green : 0
25     // CHECK-CC1-NEXT: Indigo : 0
26     // CHECK-CC1-NEXT: Orange : 0
27     // CHECK-CC1-NEXT: Violet : 0
28 
29