2009-09-22 02:10:23 +08:00
|
|
|
enum Color {
|
|
|
|
Red,
|
|
|
|
Orange,
|
|
|
|
Yellow,
|
|
|
|
Green,
|
|
|
|
Blue,
|
|
|
|
Indigo,
|
|
|
|
Violet
|
|
|
|
};
|
|
|
|
|
|
|
|
void test(enum Color color) {
|
|
|
|
switch (color) {
|
|
|
|
case Red:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Yellow:
|
|
|
|
break;
|
|
|
|
|
2009-09-23 05:11:38 +08:00
|
|
|
case Green:
|
|
|
|
break;
|
|
|
|
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:10 %s -o - | FileCheck -check-prefix=CC1 %s
|
2009-09-22 02:10:23 +08:00
|
|
|
// CHECK-CC1: Blue : 0
|
2009-09-25 06:57:42 +08:00
|
|
|
// CHECK-CC1-NEXT: Green : 0
|
|
|
|
// CHECK-CC1-NEXT: Indigo : 0
|
|
|
|
// CHECK-CC1-NEXT: Orange : 0
|
|
|
|
// CHECK-CC1-NEXT: Violet : 0
|
2009-09-23 05:11:38 +08:00
|
|
|
|