[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / clang / test / Index / complete-constructor-params.cpp
blob949077a2143a98e719c97a4d10a1faf713571658
1 // Note: the run lines follow their respective tests, since line/column
2 // matter in this test.
4 template<class T>
5 struct S {
6 template<class U>
7 S(T, U, U) {}
8 };
10 int main() {
11 S<int>(42, 42, 42);
12 S<int>(42, 42, 42);
13 S<int> s(42, 42, 42);
15 S<int>(42, 42, 42,);
16 S<int> z(42, 42, 42,);
18 int(42);
21 struct Foo {
22 Foo() = default;
23 Foo(const Foo&) = delete;
26 struct Bar {
27 Foo f;
30 void function() {
31 Bar b1;
32 Bar b2(b1);
35 // RUN: c-index-test -code-completion-at=%s:11:10 %s | FileCheck -check-prefix=CHECK-CC1 %s
36 // CHECK-CC1: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S<int> &}{RightParen )} (1)
37 // CHECK-CC1: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Placeholder U}{Comma , }{Placeholder U}{RightParen )} (1)
38 // CHECK-CC1: Completion contexts:
39 // CHECK-CC1-NEXT: Any type
40 // CHECK-CC1-NEXT: Any value
41 // CHECK-CC1-NEXT: Enum tag
42 // CHECK-CC1-NEXT: Union tag
43 // CHECK-CC1-NEXT: Struct tag
44 // CHECK-CC1-NEXT: Class name
45 // CHECK-CC1-NEXT: Nested name specifier
46 // CHECK-CC1-NEXT: Objective-C interface
48 // RUN: c-index-test -code-completion-at=%s:12:10 %s | FileCheck -check-prefix=CHECK-CC2 %s
49 // CHECK-CC2: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S<int> &}{RightParen )} (1)
50 // CHECK-CC2: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Placeholder U}{Comma , }{Placeholder U}{RightParen )} (1)
51 // CHECK-CC2: Completion contexts:
52 // CHECK-CC2-NEXT: Any type
53 // CHECK-CC2-NEXT: Any value
54 // CHECK-CC2-NEXT: Enum tag
55 // CHECK-CC2-NEXT: Union tag
56 // CHECK-CC2-NEXT: Struct tag
57 // CHECK-CC2-NEXT: Class name
58 // CHECK-CC2-NEXT: Nested name specifier
59 // CHECK-CC2-NEXT: Objective-C interface
61 // RUN: c-index-test -code-completion-at=%s:12:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
62 // CHECK-CC3: OverloadCandidate:{Text S}{LeftParen (}{Placeholder int}{Comma , }{CurrentParameter U}{Comma , }{Placeholder U}{RightParen )} (1)
63 // CHECK-CC3: Completion contexts:
64 // CHECK-CC3-NEXT: Any type
65 // CHECK-CC3-NEXT: Any value
66 // CHECK-CC3-NEXT: Enum tag
67 // CHECK-CC3-NEXT: Union tag
68 // CHECK-CC3-NEXT: Struct tag
69 // CHECK-CC3-NEXT: Class name
70 // CHECK-CC3-NEXT: Nested name specifier
71 // CHECK-CC3-NEXT: Objective-C interface
73 // RUN: c-index-test -code-completion-at=%s:12:17 %s | FileCheck -check-prefix=CHECK-CC4 %s
74 // CHECK-CC4: OverloadCandidate:{Text S}{LeftParen (}{Placeholder int}{Comma , }{Placeholder int}{Comma , }{CurrentParameter int}{RightParen )} (1)
75 // CHECK-CC4: Completion contexts:
76 // CHECK-CC4-NEXT: Any type
77 // CHECK-CC4-NEXT: Any value
78 // CHECK-CC4-NEXT: Enum tag
79 // CHECK-CC4-NEXT: Union tag
80 // CHECK-CC4-NEXT: Struct tag
81 // CHECK-CC4-NEXT: Class name
82 // CHECK-CC4-NEXT: Nested name specifier
83 // CHECK-CC4-NEXT: Objective-C interface
85 // RUN: c-index-test -code-completion-at=%s:13:12 %s | FileCheck -check-prefix=CHECK-CC5 %s
86 // CHECK-CC5: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S<int> &}{RightParen )} (1)
87 // CHECK-CC5: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Placeholder U}{Comma , }{Placeholder U}{RightParen )} (1)
88 // CHECK-CC5: Completion contexts:
89 // CHECK-CC5-NEXT: Any type
90 // CHECK-CC5-NEXT: Any value
91 // CHECK-CC5-NEXT: Enum tag
92 // CHECK-CC5-NEXT: Union tag
93 // CHECK-CC5-NEXT: Struct tag
94 // CHECK-CC5-NEXT: Class name
95 // CHECK-CC5-NEXT: Nested name specifier
96 // CHECK-CC5-NEXT: Objective-C interface
98 // RUN: c-index-test -code-completion-at=%s:13:15 %s | FileCheck -check-prefix=CHECK-CC6 %s
99 // CHECK-CC6: OverloadCandidate:{Text S}{LeftParen (}{Placeholder int}{Comma , }{CurrentParameter U}{Comma , }{Placeholder U}{RightParen )} (1)
100 // CHECK-CC6: Completion contexts:
101 // CHECK-CC6-NEXT: Any type
102 // CHECK-CC6-NEXT: Any value
103 // CHECK-CC6-NEXT: Enum tag
104 // CHECK-CC6-NEXT: Union tag
105 // CHECK-CC6-NEXT: Struct tag
106 // CHECK-CC6-NEXT: Class name
107 // CHECK-CC6-NEXT: Nested name specifier
108 // CHECK-CC6-NEXT: Objective-C interface
110 // RUN: c-index-test -code-completion-at=%s:13:19 %s | FileCheck -check-prefix=CHECK-CC7 %s
111 // CHECK-CC7: OverloadCandidate:{Text S}{LeftParen (}{Placeholder int}{Comma , }{Placeholder int}{Comma , }{CurrentParameter int}{RightParen )} (1)
112 // CHECK-CC7: Completion contexts:
113 // CHECK-CC7-NEXT: Any type
114 // CHECK-CC7-NEXT: Any value
115 // CHECK-CC7-NEXT: Enum tag
116 // CHECK-CC7-NEXT: Union tag
117 // CHECK-CC7-NEXT: Struct tag
118 // CHECK-CC7-NEXT: Class name
119 // CHECK-CC7-NEXT: Nested name specifier
120 // CHECK-CC7-NEXT: Objective-C interface
122 // RUN: c-index-test -code-completion-at=%s:15:21 %s | FileCheck -check-prefix=CHECK-CC8 %s
123 // CHECK-CC8: Completion contexts:
124 // CHECK-CC8-NEXT: Any type
125 // CHECK-CC8-NEXT: Any value
126 // CHECK-CC8-NEXT: Enum tag
127 // CHECK-CC8-NEXT: Union tag
128 // CHECK-CC8-NEXT: Struct tag
129 // CHECK-CC8-NEXT: Class name
130 // CHECK-CC8-NEXT: Nested name specifier
131 // CHECK-CC8-NEXT: Objective-C interface
133 // RUN: c-index-test -code-completion-at=%s:16:23 %s | FileCheck -check-prefix=CHECK-CC9 %s
134 // CHECK-CC9: Completion contexts:
135 // CHECK-CC9-NEXT: Any type
136 // CHECK-CC9-NEXT: Any value
137 // CHECK-CC9-NEXT: Enum tag
138 // CHECK-CC9-NEXT: Union tag
139 // CHECK-CC9-NEXT: Struct tag
140 // CHECK-CC9-NEXT: Class name
141 // CHECK-CC9-NEXT: Nested name specifier
142 // CHECK-CC9-NEXT: Objective-C interface
144 // RUN: c-index-test -code-completion-at=%s:18:7 %s | FileCheck -check-prefix=CHECK-CC10 %s
145 // CHECK-CC10: FunctionDecl:{ResultType int}{TypedText main}{LeftParen (}{RightParen )} (12)
146 // CHECK-CC10: Completion contexts:
147 // CHECK-CC10-NEXT: Any type
148 // CHECK-CC10-NEXT: Any value
149 // CHECK-CC10-NEXT: Enum tag
150 // CHECK-CC10-NEXT: Union tag
151 // CHECK-CC10-NEXT: Struct tag
152 // CHECK-CC10-NEXT: Class name
153 // CHECK-CC10-NEXT: Nested name specifier
154 // CHECK-CC10-NEXT: Objective-C interface
156 // RUN: c-index-test -code-completion-at=%s:32:12 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC11 %s
157 // CHECK-CC11-NOT: OverloadCandidate:{Text Bar}{LeftParen (}{CurrentParameter const Bar &}{RightParen )} (1)