summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/using-namespace.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-18 19:03:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-18 19:03:04 +0000
commit7e90c6db188c70e5368f48910c2d5b8df2bb8dc4 (patch)
treeacb2216fb72d9eec391a6d0a04fcd7775ddd3ce6 /clang/test/CodeCompletion/using-namespace.cpp
parent559d9741a89f2c3dcc2246b9b75c2ecf71d6da8a (diff)
downloadbcm5719-llvm-7e90c6db188c70e5368f48910c2d5b8df2bb8dc4.tar.gz
bcm5719-llvm-7e90c6db188c70e5368f48910c2d5b8df2bb8dc4.zip
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
Diffstat (limited to 'clang/test/CodeCompletion/using-namespace.cpp')
-rw-r--r--clang/test/CodeCompletion/using-namespace.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/using-namespace.cpp b/clang/test/CodeCompletion/using-namespace.cpp
new file mode 100644
index 00000000000..b30b0bcfac9
--- /dev/null
+++ b/clang/test/CodeCompletion/using-namespace.cpp
@@ -0,0 +1,24 @@
+// 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() {
+ // CHECK-CC1: I1 : 2
+ // CHECK-CC1: I4 : 2
+ // CHECK-CC1: I5 : 2
+ // CHECK-CC1: N2 : 3
+ // CHECK-NEXT-CC1: N4 : 3
+ using namespace
+
+
OpenPOWER on IntegriCloud