blob: e600267775ef941a5ae870abbc7d33a468e37616 [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
28 // CHECK-2: COMPLETION: func : [#int#]func(<#foo a#>, <#bar b#>, <#ns::bar c#>, <#ns::baz d#>
29 // CHECK-2: COMPLETION: func : [#int#]func(<#foo::type a#>, <#bar b#>, <#baz c#>
30}