enum-switch-case.cpp 615 B

12345678910111213141516171819202122232425262728
  1. namespace N {
  2. enum Color {
  3. Red,
  4. Orange,
  5. Yellow,
  6. Green,
  7. Blue,
  8. Indigo,
  9. Violet
  10. };
  11. }
  12. void test(enum N::Color color) {
  13. switch (color) {
  14. case N::Red:
  15. break;
  16. case N::Yellow:
  17. break;
  18. case
  19. // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:21:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
  20. // CHECK-CC1: Blue : [#N::Color#]N::Blue
  21. // CHECK-CC1-NEXT: Green : [#N::Color#]N::Green
  22. // CHECK-CC1-NEXT: Indigo : [#N::Color#]N::Indigo
  23. // CHECK-CC1-NEXT: Orange : [#N::Color#]N::Orange
  24. // CHECK-CC1-NEXT: Violet : [#N::Color#]N::Violet