2009-09-22 03:57:38 +08:00
|
|
|
namespace N {
|
|
|
|
enum Color {
|
|
|
|
Red,
|
|
|
|
Orange,
|
|
|
|
Yellow,
|
|
|
|
Green,
|
|
|
|
Blue,
|
|
|
|
Indigo,
|
|
|
|
Violet
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
void test(enum N::Color color) {
|
|
|
|
switch (color) {
|
2009-09-23 05:11:38 +08:00
|
|
|
case N::Red:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case N::Yellow:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:21:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
|
2010-03-10 19:27:22 +08:00
|
|
|
// CHECK-CC1: Blue : [#N::Color#]N::Blue
|
|
|
|
// CHECK-CC1-NEXT: Green : [#N::Color#]N::Green
|
|
|
|
// CHECK-CC1-NEXT: Indigo : [#N::Color#]N::Indigo
|
|
|
|
// CHECK-CC1-NEXT: Orange : [#N::Color#]N::Orange
|
|
|
|
// CHECK-CC1-NEXT: Violet : [#N::Color#]N::Violet
|
2009-09-23 05:11:38 +08:00
|
|
|
|