1 struct foo { 2 typedef int type; 3 4 type method(type, foo::type, ::foo::type, ::foo::foo::type); 5 }; 6 7 namespace ns { 8 struct bar { 9 }; 10 11 struct baz { 12 }; 13 14 int func(foo::type a, bar b, baz c); 15 } 16 17 typedef ns::bar bar; 18 19 int func(foo a, bar b, ns::bar c, ns::baz d); 20 using ns::func; 21 22 void 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 // 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#> 31 } 32