[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ast-dump-lambda.cpp
bloba4d3fe4fbda57c6f91a767d3dab9642c74fab122
1 // Test without serialization:
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 \
3 // RUN: -ast-dump %s -ast-dump-filter test \
4 // RUN: | FileCheck -strict-whitespace --match-full-lines %s
6 // Test with serialization:
7 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 \
8 // RUN: -emit-pch -o %t %s
9 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 \
10 // RUN: -x c++ -include-pch %t -ast-dump-all -ast-dump-filter test /dev/null \
11 // RUN: | FileCheck -strict-whitespace --match-full-lines %s
15 template <typename... Ts> void test(Ts... a) {
16 struct V {
17 void f() {
18 [this] {};
19 [*this] {};
22 int b, c;
23 []() {};
24 [](int a, ...) {};
25 [a...] {};
26 [=] {};
27 [=] { return b; };
28 [&] {};
29 [&] { return c; };
30 [b, &c] { return b + c; };
31 [a..., x = 12] {};
32 []() constexpr {};
33 []() mutable {};
34 []() noexcept {};
35 []() -> int { return 0; };
36 [] [[noreturn]] () {};
38 // CHECK:Dumping test:
39 // CHECK-NEXT:FunctionTemplateDecl {{.*}} <{{.*}}ast-dump-lambda.cpp:15:1, line:37:1> line:15:32{{( imported)?}} test
40 // CHECK-NEXT:|-TemplateTypeParmDecl {{.*}} <col:11, col:23> col:23{{( imported)?}} referenced typename depth 0 index 0 ... Ts
41 // CHECK-NEXT:`-FunctionDecl {{.*}} <col:27, line:37:1> line:15:32{{( imported)?}} test 'void (Ts...)'
42 // CHECK-NEXT: |-ParmVarDecl {{.*}} <col:37, col:43> col:43{{( imported)?}} referenced a 'Ts...' pack
43 // CHECK-NEXT: `-CompoundStmt {{.*}} <col:46, line:37:1>
44 // CHECK-NEXT: |-DeclStmt {{.*}} <line:16:3, line:21:4>
45 // CHECK-NEXT: | `-CXXRecordDecl {{.*}} <line:16:3, line:21:3> line:16:10{{( imported)?}}{{( <undeserialized declarations>)?}} struct V definition
46 // CHECK-NEXT: | |-DefinitionData empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init
47 // CHECK-NEXT: | | |-DefaultConstructor exists trivial constexpr needs_implicit defaulted_is_constexpr
48 // CHECK-NEXT: | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
49 // CHECK-NEXT: | | |-MoveConstructor exists simple trivial needs_implicit
50 // CHECK-NEXT: | | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
51 // CHECK-NEXT: | | |-MoveAssignment exists simple trivial needs_implicit
52 // CHECK-NEXT: | | `-Destructor simple irrelevant trivial needs_implicit
53 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3, col:10> col:10{{( imported)?}} implicit struct V
54 // CHECK-NEXT: | `-CXXMethodDecl {{.*}} <line:17:5, line:20:5> line:17:10{{( imported)?}} f 'void ()' implicit-inline
55 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:14, line:20:5>
56 // CHECK-NEXT: | |-LambdaExpr {{.*}} <line:18:7, col:15> '(lambda at {{.*}}ast-dump-lambda.cpp:18:7)'
57 // CHECK-NEXT: | | |-CXXRecordDecl {{.*}} <col:7> col:7{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
58 // CHECK-NEXT: | | | |-DefinitionData lambda standard_layout trivially_copyable can_const_default_init
59 // CHECK-NEXT: | | | | |-DefaultConstructor
60 // CHECK-NEXT: | | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
61 // CHECK-NEXT: | | | | |-MoveConstructor exists simple trivial needs_implicit
62 // CHECK-NEXT: | | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
63 // CHECK-NEXT: | | | | |-MoveAssignment
64 // CHECK-NEXT: | | | | `-Destructor simple irrelevant trivial needs_implicit
65 // CHECK-NEXT: | | | |-CXXMethodDecl {{.*}} <col:12, col:15> col:7{{( imported)?}} operator() 'auto () const -> auto' inline
66 // CHECK-NEXT: | | | | `-CompoundStmt {{.*}} <col:14, col:15>
67 // CHECK-NEXT: | | | `-FieldDecl {{.*}} <col:8> col:8{{( imported)?}} implicit 'V *'
68 // CHECK-NEXT: | | |-ParenListExpr {{.*}} <col:8> 'NULL TYPE'
69 // CHECK-NEXT: | | | `-CXXThisExpr {{.*}} <col:8> 'V *' this
70 // CHECK-NEXT: | | `-CompoundStmt {{.*}} <col:14, col:15>
71 // CHECK-NEXT: | `-LambdaExpr {{.*}} <line:19:7, col:16> '(lambda at {{.*}}ast-dump-lambda.cpp:19:7)'
72 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:7> col:7{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
73 // CHECK-NEXT: | | |-DefinitionData lambda standard_layout trivially_copyable can_const_default_init
74 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
75 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
76 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
77 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
78 // CHECK-NEXT: | | | |-MoveAssignment
79 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
80 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:13, col:16> col:7{{( imported)?}} operator() 'auto () const -> auto' inline
81 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:15, col:16>
82 // CHECK-NEXT: | | `-FieldDecl {{.*}} <col:8> col:8{{( imported)?}} implicit 'V'
83 // CHECK-NEXT: | |-ParenListExpr {{.*}} <col:8> 'NULL TYPE'
84 // CHECK-NEXT: | | `-UnaryOperator {{.*}} <col:8> 'V' lvalue prefix '*' cannot overflow
85 // CHECK-NEXT: | | `-CXXThisExpr {{.*}} <col:8> 'V *' this
86 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:15, col:16>
87 // CHECK-NEXT: |-DeclStmt {{.*}} <line:22:3, col:11>
88 // CHECK-NEXT: | |-VarDecl {{.*}} <col:3, col:7> col:7{{( imported)?}} referenced b 'int'
89 // CHECK-NEXT: | `-VarDecl {{.*}} <col:3, col:10> col:10{{( imported)?}} referenced c 'int'
90 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:23:3, col:9> '(lambda at {{.*}}ast-dump-lambda.cpp:23:3)'
91 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
92 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
93 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
94 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
95 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
96 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
97 // CHECK-NEXT: | | | |-MoveAssignment
98 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
99 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:6, col:9> col:3{{( imported)?}} operator() 'auto () const' inline
100 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:8, col:9>
101 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:9> col:3{{( imported)?}} implicit constexpr operator auto (*)() 'auto (*() const noexcept)()' inline
102 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:9> col:3{{( imported)?}} implicit __invoke 'auto ()' static inline
103 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:8, col:9>
104 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:24:3, col:19> '(lambda at {{.*}}ast-dump-lambda.cpp:24:3)'
105 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
106 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
107 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
108 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
109 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
110 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
111 // CHECK-NEXT: | | | |-MoveAssignment
112 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
113 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:16, col:19> col:3{{( imported)?}} operator() 'auto (int, ...) const' inline
114 // CHECK-NEXT: | | | |-ParmVarDecl {{.*}} <col:6, col:10> col:10{{( imported)?}} a 'int'
115 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:18, col:19>
116 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:19> col:3{{( imported)?}} implicit constexpr operator auto (*)(int, ...) 'auto (*() const noexcept)(int, ...)' inline
117 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:19> col:3{{( imported)?}} implicit __invoke 'auto (int, ...)' static inline
118 // CHECK-NEXT: | | `-ParmVarDecl {{.*}} <col:6, col:10> col:10{{( imported)?}} a 'int'
119 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:18, col:19>
120 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:25:3, col:11> '(lambda at {{.*}}ast-dump-lambda.cpp:25:3)'
121 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
122 // CHECK-NEXT: | | |-DefinitionData lambda standard_layout trivially_copyable can_const_default_init
123 // CHECK-NEXT: | | | |-DefaultConstructor
124 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
125 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
126 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
127 // CHECK-NEXT: | | | |-MoveAssignment
128 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
129 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:8, col:11> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
130 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:10, col:11>
131 // CHECK-NEXT: | | `-FieldDecl {{.*}} <col:4> col:4{{( imported)?}} implicit 'Ts...'
132 // CHECK-NEXT: | |-ParenListExpr {{.*}} <col:4> 'NULL TYPE'
133 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:4> 'Ts' lvalue ParmVar {{.*}} 'a' 'Ts...'
134 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:10, col:11>
135 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:26:3, col:8> '(lambda at {{.*}}ast-dump-lambda.cpp:26:3)'
136 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
137 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
138 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
139 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
140 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
141 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
142 // CHECK-NEXT: | | | |-MoveAssignment
143 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
144 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:5, col:8> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
145 // CHECK-NEXT: | | `-CompoundStmt {{.*}} <col:7, col:8>
146 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:7, col:8>
147 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:27:3, col:19> '(lambda at {{.*}}ast-dump-lambda.cpp:27:3)'
148 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
149 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
150 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
151 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
152 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
153 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
154 // CHECK-NEXT: | | | |-MoveAssignment
155 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
156 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:5, col:19> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
157 // CHECK-NEXT: | | `-CompoundStmt {{.*}} <col:7, col:19>
158 // CHECK-NEXT: | | `-ReturnStmt {{.*}} <col:9, col:16>
159 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:16> 'const int' lvalue Var {{.*}} 'b' 'int' refers_to_enclosing_variable_or_capture
160 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:7, col:19>
161 // CHECK-NEXT: | `-ReturnStmt {{.*}} <col:9, col:16>
162 // CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:16> 'const int' lvalue Var {{.*}} 'b' 'int' refers_to_enclosing_variable_or_capture
163 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:28:3, col:8> '(lambda at {{.*}}ast-dump-lambda.cpp:28:3)'
164 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
165 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
166 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
167 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
168 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
169 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
170 // CHECK-NEXT: | | | |-MoveAssignment
171 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
172 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:5, col:8> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
173 // CHECK-NEXT: | | `-CompoundStmt {{.*}} <col:7, col:8>
174 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:7, col:8>
175 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:29:3, col:19> '(lambda at {{.*}}ast-dump-lambda.cpp:29:3)'
176 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
177 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
178 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
179 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
180 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
181 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
182 // CHECK-NEXT: | | | |-MoveAssignment
183 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
184 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:5, col:19> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
185 // CHECK-NEXT: | | `-CompoundStmt {{.*}} <col:7, col:19>
186 // CHECK-NEXT: | | `-ReturnStmt {{.*}} <col:9, col:16>
187 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:16> 'int' lvalue Var {{.*}} 'c' 'int' refers_to_enclosing_variable_or_capture
188 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:7, col:19>
189 // CHECK-NEXT: | `-ReturnStmt {{.*}} <col:9, col:16>
190 // CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:16> 'int' lvalue Var {{.*}} 'c' 'int' refers_to_enclosing_variable_or_capture
191 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:30:3, col:27> '(lambda at {{.*}}ast-dump-lambda.cpp:30:3)'
192 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
193 // CHECK-NEXT: | | |-DefinitionData lambda trivially_copyable literal can_const_default_init
194 // CHECK-NEXT: | | | |-DefaultConstructor
195 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
196 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
197 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
198 // CHECK-NEXT: | | | |-MoveAssignment
199 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
200 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:9, col:27> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
201 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:11, col:27>
202 // CHECK-NEXT: | | | `-ReturnStmt {{.*}} <col:13, col:24>
203 // CHECK-NEXT: | | | `-BinaryOperator {{.*}} <col:20, col:24> 'int' '+'
204 // CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:20> 'int' <LValueToRValue>
205 // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:20> 'const int' lvalue Var {{.*}} 'b' 'int' refers_to_enclosing_variable_or_capture
206 // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:24> 'int' <LValueToRValue>
207 // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:24> 'int' lvalue Var {{.*}} 'c' 'int' refers_to_enclosing_variable_or_capture
208 // CHECK-NEXT: | | |-FieldDecl {{.*}} <col:4> col:4{{( imported)?}} implicit 'int'
209 // CHECK-NEXT: | | `-FieldDecl {{.*}} <col:8> col:8{{( imported)?}} implicit 'int &'
210 // CHECK-NEXT: | |-ImplicitCastExpr {{.*}} <col:4> 'int' <LValueToRValue>
211 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:4> 'int' lvalue Var {{.*}} 'b' 'int'
212 // CHECK-NEXT: | |-DeclRefExpr {{.*}} <col:8> 'int' lvalue Var {{.*}} 'c' 'int'
213 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:11, col:27>
214 // CHECK-NEXT: | `-ReturnStmt {{.*}} <col:13, col:24>
215 // CHECK-NEXT: | `-BinaryOperator {{.*}} <col:20, col:24> 'int' '+'
216 // CHECK-NEXT: | |-ImplicitCastExpr {{.*}} <col:20> 'int' <LValueToRValue>
217 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:20> 'const int' lvalue Var {{.*}} 'b' 'int' refers_to_enclosing_variable_or_capture
218 // CHECK-NEXT: | `-ImplicitCastExpr {{.*}} <col:24> 'int' <LValueToRValue>
219 // CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:24> 'int' lvalue Var {{.*}} 'c' 'int' refers_to_enclosing_variable_or_capture
220 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:31:3, col:19> '(lambda at {{.*}}ast-dump-lambda.cpp:31:3)'
221 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
222 // CHECK-NEXT: | | |-DefinitionData lambda standard_layout trivially_copyable can_const_default_init
223 // CHECK-NEXT: | | | |-DefaultConstructor
224 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
225 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
226 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
227 // CHECK-NEXT: | | | |-MoveAssignment
228 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
229 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:16, col:19> col:3{{( imported)?}} operator() 'auto () const -> auto' inline
230 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:18, col:19>
231 // CHECK-NEXT: | | |-FieldDecl {{.*}} <col:4> col:4{{( imported)?}} implicit 'Ts...'
232 // CHECK-NEXT: | | `-FieldDecl {{.*}} <col:10> col:10{{( imported)?}} implicit 'int'
233 // CHECK-NEXT: | |-ParenListExpr {{.*}} <col:4> 'NULL TYPE'
234 // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:4> 'Ts' lvalue ParmVar {{.*}} 'a' 'Ts...'
235 // CHECK-NEXT: | |-IntegerLiteral {{.*}} <col:14> 'int' 12
236 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:18, col:19>
237 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:32:3, col:19> '(lambda at {{.*}}ast-dump-lambda.cpp:32:3)'
238 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
239 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
240 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
241 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
242 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
243 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
244 // CHECK-NEXT: | | | |-MoveAssignment
245 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
246 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:8, col:19> col:3{{( imported)?}} constexpr operator() 'auto () const' inline
247 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:18, col:19>
248 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:19> col:3{{( imported)?}} implicit constexpr operator auto (*)() 'auto (*() const noexcept)()' inline
249 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:19> col:3{{( imported)?}} implicit constexpr __invoke 'auto ()' static inline
250 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:18, col:19>
251 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:33:3, col:17> '(lambda at {{.*}}ast-dump-lambda.cpp:33:3)'
252 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
253 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
254 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
255 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
256 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
257 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
258 // CHECK-NEXT: | | | |-MoveAssignment
259 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
260 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:8, col:17> col:3{{( imported)?}} operator() 'auto ()' inline
261 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:16, col:17>
262 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:17> col:3{{( imported)?}} implicit constexpr operator auto (*)() 'auto (*() const noexcept)()' inline
263 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:17> col:3{{( imported)?}} implicit __invoke 'auto ()' static inline
264 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:16, col:17>
265 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:34:3, col:18> '(lambda at {{.*}}ast-dump-lambda.cpp:34:3)'
266 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
267 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
268 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
269 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
270 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
271 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
272 // CHECK-NEXT: | | | |-MoveAssignment
273 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
274 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:8, col:18> col:3{{( imported)?}} operator() 'auto () const noexcept' inline
275 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:17, col:18>
276 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:18> col:3{{( imported)?}} implicit constexpr operator auto (*)() noexcept 'auto (*() const noexcept)() noexcept' inline
277 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:18> col:3{{( imported)?}} implicit __invoke 'auto () noexcept' static inline
278 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:17, col:18>
279 // CHECK-NEXT: |-LambdaExpr {{.*}} <line:35:3, col:27> '(lambda at {{.*}}ast-dump-lambda.cpp:35:3)'
280 // CHECK-NEXT: | |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
281 // CHECK-NEXT: | | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
282 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
283 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
284 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
285 // CHECK-NEXT: | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
286 // CHECK-NEXT: | | | |-MoveAssignment
287 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial needs_implicit
288 // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} <col:11, col:27> col:3{{( imported)?}} operator() 'auto () const -> int' inline
289 // CHECK-NEXT: | | | `-CompoundStmt {{.*}} <col:15, col:27>
290 // CHECK-NEXT: | | | `-ReturnStmt {{.*}} <col:17, col:24>
291 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:24> 'int' 0
292 // CHECK-NEXT: | | |-CXXConversionDecl {{.*}} <col:3, col:27> col:3{{( imported)?}} implicit constexpr operator int (*)() 'auto (*() const noexcept)() -> int' inline
293 // CHECK-NEXT: | | `-CXXMethodDecl {{.*}} <col:3, col:27> col:3{{( imported)?}} implicit __invoke 'auto () -> int' static inline
294 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:15, col:27>
295 // CHECK-NEXT: | `-ReturnStmt {{.*}} <col:17, col:24>
296 // CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:24> 'int' 0
297 // CHECK-NEXT: `-LambdaExpr {{.*}} <line:36:3, col:23> '(lambda at {{.*}}ast-dump-lambda.cpp:36:3)'
298 // CHECK-NEXT: |-CXXRecordDecl {{.*}} <col:3> col:3{{( imported)?}} implicit{{( <undeserialized declarations>)?}} class definition
299 // CHECK-NEXT: | |-DefinitionData lambda empty standard_layout trivially_copyable literal can_const_default_init
300 // CHECK-NEXT: | | |-DefaultConstructor defaulted_is_constexpr
301 // CHECK-NEXT: | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
302 // CHECK-NEXT: | | |-MoveConstructor exists simple trivial needs_implicit
303 // CHECK-NEXT: | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
304 // CHECK-NEXT: | | |-MoveAssignment
305 // CHECK-NEXT: | | `-Destructor simple irrelevant trivial needs_implicit
306 // CHECK-NEXT: | |-CXXMethodDecl {{.*}} <col:20, col:23> col:3{{( imported)?}} operator() 'auto () const' inline
307 // CHECK-NEXT: | | |-CompoundStmt {{.*}} <col:22, col:23>
308 // CHECK-NEXT: | | `-CXX11NoReturnAttr {{.*}} <col:8> noreturn
309 // CHECK-NEXT: | |-CXXConversionDecl {{.*}} <col:3, col:23> col:3{{( imported)?}} implicit constexpr operator auto (*)() 'auto (*() const noexcept)()' inline
310 // CHECK-NEXT: | `-CXXMethodDecl {{.*}} <col:3, col:23> col:3{{( imported)?}} implicit __invoke 'auto ()' static inline
311 // CHECK-NEXT: `-CompoundStmt {{.*}} <col:22, col:23>