Douglas Gregor | b9d0ef7 | 2009-09-21 19:57:38 +0000 | [diff] [blame] | 1 | namespace M { |
| 2 | |
| 3 | namespace N { |
| 4 | struct C { |
| 5 | enum Color { |
| 6 | Red, |
| 7 | Orange, |
| 8 | Yellow, |
| 9 | Green, |
| 10 | Blue, |
| 11 | Indigo, |
| 12 | Violet |
| 13 | }; |
| 14 | }; |
| 15 | } |
| 16 | |
| 17 | } |
| 18 | |
| 19 | namespace M { |
| 20 | |
| 21 | void test(enum N::C::Color color) { |
| 22 | switch (color) { |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 23 | case |
| 24 | // RUN: clang-cc -fsyntax-only -code-completion-at=%s:23:8 %s -o - | FileCheck -check-prefix=CC1 %s && |
| 25 | // RUN: true |
Douglas Gregor | 119fa68 | 2009-09-24 22:57:42 +0000 | [diff] [blame] | 26 | // CHECK-CC1: Blue : 0 : N::C::Blue |
| 27 | // CHECK-CC1-NEXT: Green : 0 : N::C::Green |
| 28 | // CHECK-CC1-NEXT: Indigo : 0 : N::C::Indigo |
| 29 | // CHECK-CC1-NEXT: Orange : 0 : N::C::Orange |
| 30 | // CHECK-CC1-NEXT: Red : 0 : N::C::Red |
| 31 | // CHECK-CC1-NEXT: Violet : 0 : N::C::Violet |
| 32 | // CHECK-CC1: Yellow : 0 : N::C::Yellow |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 33 | |