From 7e90c6db188c70e5368f48910c2d5b8df2bb8dc4 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 18 Sep 2009 19:03:04 +0000 Subject: Introduce four new code-completion hooks for C++: - after "using", show anything that can be a nested-name-specifier. - after "using namespace", show any visible namespaces or namespace aliases - after "namespace", show any namespace definitions in the current scope - after "namespace identifier = ", show any visible namespaces or namespace aliases llvm-svn: 82251 --- clang/test/CodeCompletion/using.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 clang/test/CodeCompletion/using.cpp (limited to 'clang/test/CodeCompletion/using.cpp') diff --git a/clang/test/CodeCompletion/using.cpp b/clang/test/CodeCompletion/using.cpp new file mode 100644 index 00000000000..7bef3534599 --- /dev/null +++ b/clang/test/CodeCompletion/using.cpp @@ -0,0 +1,27 @@ +// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && +// RUN: true + +namespace N4 { + namespace N3 { } +} + +class N3; + +namespace N2 { + namespace I1 { } + namespace I4 = I1; + namespace I5 { } + namespace I1 { } + + void foo() { + int N3; + + // CHECK-CC1: I1 : 2 + // CHECK-CC1: I4 : 2 + // CHECK-CC1: I5 : 2 + // CHECK-CC1: N2 : 3 + // CHECK-CC1: N3 : 3 + // CHECK-NEXT-CC1: N4 : 3 + using + + -- cgit v1.2.3