summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-18 17:42:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-18 17:42:29 +0000
commit945e8d9762e1348c05d1f15a957b16118686cc7d (patch)
tree7a49ad79bf57c834ed979727b64236ae3bf9ae82 /clang/test/CodeCompletion
parente79171ca42a351dd5681e676f3a6086e27dc12c0 (diff)
downloadbcm5719-llvm-945e8d9762e1348c05d1f15a957b16118686cc7d.tar.gz
bcm5719-llvm-945e8d9762e1348c05d1f15a957b16118686cc7d.zip
For code completion in C++ member access expressions and tag names,
look into the current scope for anything that could start a nested-names-specifier. These results are ranked worse than any of the results actually found in the lexical scope. Perform a little more pruning of the result set, eliminating constructors, __va_list_tag, and any duplication of declarations in the result set. For the latter, implemented NamespaceDecl::getCanonicalDecl. llvm-svn: 82231
Diffstat (limited to 'clang/test/CodeCompletion')
-rw-r--r--clang/test/CodeCompletion/tag.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/tag.cpp b/clang/test/CodeCompletion/tag.cpp
new file mode 100644
index 00000000000..addad9d7690
--- /dev/null
+++ b/clang/test/CodeCompletion/tag.cpp
@@ -0,0 +1,20 @@
+// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s &&
+// RUN: true
+
+class X { };
+struct Y { };
+
+namespace N {
+ template<typename> class Z;
+}
+
+namespace N {
+ class Y;
+
+ void test() {
+ // CHECK-CC1: Y : 2
+ // CHECK-CC1: Z : 2
+ // CHECK-CC1: X : 3
+ // CHECK-CC1: Y : 3
+ // CHECK-CC1: N : 6
+ class
OpenPOWER on IntegriCloud