Home | History | Annotate | Download | only in CodeCompletion
      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 
     23   unsigned c2;
     24   switch (c2) {
     25     case
     26   }
     27 
     28     // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:10 %s -o - | FileCheck -check-prefix=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
     34 
     35     // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:25:10 %s -o - | FileCheck -check-prefix=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
     46