brintos

brintos / llvm-project-archived public Read only

0
0
Text · 986 B · e5a63d2 Raw
32 lines · cpp
1struct 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:%(line-1):9 %s -o - | FileCheck %s --check-prefix=CHECK-125  // CHECK-1: COMPLETION: method : [#type#]method(<#type#>, <#foo::type#>, <#::foo::type#>, <#::foo::foo::type#>)26  f27  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):3 %s -o - | FileCheck %s --check-prefix=CHECK-228  // 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