blob: 90530ec65c97a8d070ee5834cad1edf1577b68f4 [file] [log] [blame]
Ilya Biryukovb5da91c2017-11-08 10:39:09 +00001struct foo {
2 typedef int type;
3
4 type method(type, foo::type, ::foo::type, ::foo::foo::type);
5};
6
7namespace ns {
8 struct bar {
9 };
10
11 struct baz {
12 };
13
14 int func(foo::type a, bar b, baz c);
15}
16
17typedef ns::bar bar;
18
19int func(foo a, bar b, ns::bar c, ns::baz d);
20using ns::func;
21
22void test() {
23 foo().method(0, 0, 0, 0);
24 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:9 %s -o - | FileCheck %s --check-prefix=CHECK-1
25 // CHECK-1: COMPLETION: method : [#type#]method(<#type#>, <#foo::type#>, <#::foo::type#>, <#::foo::foo::type#>)
26 f
27 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:26:3 %s -o - | FileCheck %s --check-prefix=CHECK-2
Ilya Biryukov5df0d122017-11-08 13:05:52 +000028 // FIXME(ibiryukov): We should get rid of CHECK-DAGs here when completion output is made deterministic (see PR35244).
29 // CHECK-2-DAG: COMPLETION: func : [#int#]func(<#foo a#>, <#bar b#>, <#ns::bar c#>, <#ns::baz d#>
30 // CHECK-2-DAG: COMPLETION: func : [#int#]func(<#foo::type a#>, <#bar b#>, <#baz c#>
Ilya Biryukovb5da91c2017-11-08 10:39:09 +000031}