[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeCompletion / qualifiers-as-written.cpp
blobe5a63d248635329ca7ebb5d761922009ad60ebef
1 struct foo {
2 typedef int type;
4 type method(type, foo::type, ::foo::type, ::foo::foo::type);
5 };
7 namespace ns {
8 struct bar {
9 };
11 struct baz {
14 int func(foo::type a, bar b, baz c);
17 typedef ns::bar bar;
19 int func(foo a, bar b, ns::bar c, ns::baz d);
20 using ns::func;
22 void 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-1
25 // CHECK-1: COMPLETION: method : [#type#]method(<#type#>, <#foo::type#>, <#::foo::type#>, <#::foo::foo::type#>)
27 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):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#>