aboutsummaryrefslogtreecommitdiff
path: root/test/CodeCompletion/ignore-ns-level-decls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeCompletion/ignore-ns-level-decls.cpp')
-rw-r--r--test/CodeCompletion/ignore-ns-level-decls.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeCompletion/ignore-ns-level-decls.cpp b/test/CodeCompletion/ignore-ns-level-decls.cpp
new file mode 100644
index 000000000000..59cee6536a5d
--- /dev/null
+++ b/test/CodeCompletion/ignore-ns-level-decls.cpp
@@ -0,0 +1,21 @@
+namespace ns {
+ struct bar {
+ };
+
+ struct baz {
+ };
+
+ int func(int a, bar b, baz c);
+}
+
+void test() {
+ ns::
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:12:7 %s -o - | FileCheck %s --check-prefix=CHECK-1
+// CHECK-1-DAG: COMPLETION: bar : bar
+// CHECK-1-DAG: COMPLETION: baz : baz
+// CHECK-1-DAG: COMPLETION: func : [#int#]func(<#int a#>, <#bar b#>, <#baz c#>)
+
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:12:7 -no-code-completion-ns-level-decls %s -o - | FileCheck %s --allow-empty --check-prefix=CHECK-EMPTY
+// CHECK-EMPTY-NOT: COMPLETION: bar : bar
+// CHECK-EMPTY: {{^}}{{$}}
+}