xref: /minix3/external/bsd/llvm/dist/clang/test/CodeCompletion/enum-switch-case-qualified.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc namespace M {
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc namespace N {
4*f4a2713aSLionel Sambuc   struct C {
5*f4a2713aSLionel Sambuc     enum Color {
6*f4a2713aSLionel Sambuc       Red,
7*f4a2713aSLionel Sambuc       Orange,
8*f4a2713aSLionel Sambuc       Yellow,
9*f4a2713aSLionel Sambuc       Green,
10*f4a2713aSLionel Sambuc       Blue,
11*f4a2713aSLionel Sambuc       Indigo,
12*f4a2713aSLionel Sambuc       Violet
13*f4a2713aSLionel Sambuc     };
14*f4a2713aSLionel Sambuc   };
15*f4a2713aSLionel Sambuc }
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc }
18*f4a2713aSLionel Sambuc 
19*f4a2713aSLionel Sambuc namespace M {
20*f4a2713aSLionel Sambuc 
test(enum N::C::Color color)21*f4a2713aSLionel Sambuc void test(enum N::C::Color color) {
22*f4a2713aSLionel Sambuc   switch (color) {
23*f4a2713aSLionel Sambuc   case
24*f4a2713aSLionel Sambuc     // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
25*f4a2713aSLionel Sambuc     // CHECK-CC1: Blue : [#M::N::C::Color#]N::C::Blue
26*f4a2713aSLionel Sambuc     // CHECK-CC1-NEXT: Green : [#M::N::C::Color#]N::C::Green
27*f4a2713aSLionel Sambuc     // CHECK-CC1-NEXT: Indigo : [#M::N::C::Color#]N::C::Indigo
28*f4a2713aSLionel Sambuc     // CHECK-CC1-NEXT: Orange : [#M::N::C::Color#]N::C::Orange
29*f4a2713aSLionel Sambuc     // CHECK-CC1-NEXT: Red : [#M::N::C::Color#]N::C::Red
30*f4a2713aSLionel Sambuc     // CHECK-CC1-NEXT: Violet : [#M::N::C::Color#]N::C::Violet
31*f4a2713aSLionel Sambuc     // CHECK-CC1: Yellow : [#M::N::C::Color#]N::C::Yellow
32*f4a2713aSLionel Sambuc 
33