4 struct Foo
: public Base
{
11 Foo F
{.x
= 2, .b
.t
= 0};
12 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):10 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC1 %s
13 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-2):18 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC1 %s
14 // CHECK-CC1: COMPLETION: b : [#Base#]b
15 // CHECK-CC1-NEXT: COMPLETION: x : [#int#]x
19 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-8):20 %s -o - | FileCheck -check-prefix=CHECK-NESTED %s
20 // CHECK-NESTED: COMPLETION: t : [#int#]t
23 auto z
= [](Base B
) {};
27 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-5):14 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC2 %s
28 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-4):7 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC2 %s
29 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-4):11 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC2 %s
30 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-4):13 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC2 %s
31 // CHECK-CC2: COMPLETION: t : [#int#]t
32 auto zr
= [](const Base
&B
) {};
34 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):8 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-REF %s
35 // CHECK-REF: COMPLETION: t : [#int#]t
37 Foo G1
{.b
= {.t
= 0}};
40 // RUN: %clang_cc1 -code-completion-at=%s:%(line-3):17 -fsyntax-only -code-completion-patterns %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-NESTED-2 %s
41 // RUN: %clang_cc1 -code-completion-at=%s:%(line-3):14 -fsyntax-only -code-completion-patterns %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-NESTED-2 %s
42 // RUN: %clang_cc1 -code-completion-at=%s:%(line-3):15 -fsyntax-only -code-completion-patterns %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-NESTED-2 %s
43 // CHECK-NESTED-2: COMPLETION: t : [#int#]t
56 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):17 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC3 %s
57 // CHECK-CC3: COMPLETION: x : [#T#]x
59 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):16 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC4 %s
60 // CHECK-CC4: COMPLETION: x : [#int#]x
61 // CHECK-CC4-NEXT: COMPLETION: y : [#char#]y
67 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):14 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC3 %s
70 namespace signature_regression
{
71 // Verify that an old bug is gone: passing an init-list as a constructor arg
72 // would emit overloads as a side-effect.
76 int dummy
= wrongFunction({1});
77 int x
= rightFunction();
78 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):25 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-SIGNATURE-REGRESSION %s
79 // CHECK-SIGNATURE-REGRESSION-NOT: OVERLOAD: [#int#]wrongFunction
80 // CHECK-SIGNATURE-REGRESSION: OVERLOAD: [#int#]rightFunction
81 // CHECK-SIGNATURE-REGRESSION-NOT: OVERLOAD: [#int#]wrongFunction
86 struct { int inner
; };
88 auto TestWithAnon
= WithAnon
{ .inner
= 2 };
89 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:%(line-1):33 %s -o - -std=c++2a | FileCheck -check-prefix=CHECK-CC5 %s
90 // CHECK-CC5: COMPLETION: inner : [#int#]inner
91 // CHECK-CC5: COMPLETION: outer : [#int#]outer