Douglas Gregor | 84139d6 | 2010-04-05 21:25:31 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
Douglas Gregor | 5c722c70 | 2011-02-18 23:30:37 +0000 | [diff] [blame] | 4 | enum Color { |
| 5 | Color_Red = 17, |
| 6 | Color_Green, |
| 7 | Color_Blue |
Douglas Gregor | 84139d6 | 2010-04-05 21:25:31 +0000 | [diff] [blame] | 8 | }; |
Douglas Gregor | 5c722c70 | 2011-02-18 23:30:37 +0000 | [diff] [blame] | 9 | int Greeby(); |
| 10 | void f(Color color) { |
| 11 | switch (color) { |
| 12 | case Red: |
| 13 | } |
Douglas Gregor | 84139d6 | 2010-04-05 21:25:31 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | // RUN: c-index-test -code-completion-at=%s:11:1 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 5c722c70 | 2011-02-18 23:30:37 +0000 | [diff] [blame] | 17 | // CHECK-CC1: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Red} |
| 18 | |
| 19 | // RUN: c-index-test -code-completion-at=%s:12:8 %s | FileCheck -check-prefix=CHECK-CC2 %s |
| 20 | // CHECK-CC2: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Blue} (7) |
| 21 | // CHECK-CC2-NEXT: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Green} (7) |
| 22 | // CHECK-CC2-NEXT: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Red} (7) |