blob: 713e24f798b775a39e4c53818c2c0d5ac540c0a3 [file] [log] [blame]
Douglas Gregor84139d62010-04-05 21:25:31 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
3
Douglas Gregor8e42f272012-03-17 06:39:06 +00004enum __attribute__((deprecated)) Color {
Douglas Gregor5c722c702011-02-18 23:30:37 +00005 Color_Red = 17,
6 Color_Green,
7 Color_Blue
Douglas Gregor84139d62010-04-05 21:25:31 +00008};
Douglas Gregor5c722c702011-02-18 23:30:37 +00009int Greeby();
Douglas Gregor8e42f272012-03-17 06:39:06 +000010void f(enum Color color) {
Douglas Gregor5c722c702011-02-18 23:30:37 +000011 switch (color) {
12 case Red:
13 }
Douglas Gregor84139d62010-04-05 21:25:31 +000014}
15
16// RUN: c-index-test -code-completion-at=%s:11:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
Douglas Gregor8e42f272012-03-17 06:39:06 +000017// CHECK-CC1: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Red} (65) (deprecated)
Douglas Gregor5c722c702011-02-18 23:30:37 +000018
19// RUN: c-index-test -code-completion-at=%s:12:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
Douglas Gregor8e42f272012-03-17 06:39:06 +000020// CHECK-CC2: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Blue} (7) (deprecated)
21// CHECK-CC2-NEXT: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Green} (7) (deprecated)
22// CHECK-CC2-NEXT: EnumConstantDecl:{ResultType enum Color}{TypedText Color_Red} (7) (deprecated)