25 lines · cpp
1namespace N {2 enum Color {3 Red,4 Blue,5 Orange,6 };7}8 9void test(N::Color color) {10 color = N::Color::Red;11 test(N::Color::Red);12 if (color == N::Color::Red) {}13 // FIXME: ideally, we should not show 'Red' on the next line.14 else if (color == N::Color::Blue) {}15 16 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):11 %s -o - | FileCheck %s17 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):8 %s -o - | FileCheck %s18 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):16 %s -o - | FileCheck %s19 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-5):21 %s -o - | FileCheck %s20 // CHECK: Blue : [#N::Color#]N::Blue21 // CHECK: color : [#N::Color#]color22 // CHECK: Orange : [#N::Color#]N::Orange23 // CHECK: Red : [#N::Color#]N::Red24}25