1 // RUN: %clang_cc1 -std=c++17 -verify=expected,cxx17 %s
2 // RUN: %clang_cc1 -std=c++20 -verify=expected,cxx20 -ast-dump -ast-dump-decl-types -ast-dump-filter "deduction guide" %s | FileCheck %s --strict-whitespace
5 template<class T
> struct A
{ // cxx17-note 6 {{candidate}} cxx17-note 6 {{implicit deduction guide}}
10 A a1
= {3.0, 4.0}; // cxx17-error {{no viable}}
11 A a2
= {.x
= 3.0, .y
= 4.0}; // cxx17-error {{no viable}}
13 A
a3(3.0, 4.0); // cxx17-error {{no viable}}
15 // CHECK-LABEL: Dumping Basic::<deduction guide for A>:
16 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
17 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced class depth 0 index 0 T
18 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T, T) -> A<T>'
19 // CHECK: | |-ParmVarDecl {{.*}} 'T'
20 // CHECK: | `-ParmVarDecl {{.*}} 'T'
21 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (double, double) -> Basic::A<double>'
22 // CHECK: |-TemplateArgument type 'double'
23 // CHECK: | `-BuiltinType {{.*}} 'double'
24 // CHECK: |-ParmVarDecl {{.*}} 'double'
25 // CHECK: `-ParmVarDecl {{.*}} 'double'
26 // CHECK: FunctionProtoType {{.*}} 'auto (T, T) -> A<T>' dependent trailing_return cdecl
27 // CHECK: |-InjectedClassNameType {{.*}} 'A<T>' dependent
28 // CHECK: | `-CXXRecord {{.*}} 'A'
29 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
30 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
31 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
32 // CHECK: `-TemplateTypeParm {{.*}} 'T'
34 template <typename T
> struct S
{ // cxx20-note 2 {{candidate}}
39 template <typename T
> struct C
{ // cxx20-note 10 {{candidate}} cxx17-note 12 {{candidate}} \
40 cxx20
-note
10 {{implicit deduction guide
}} cxx17
-note
12 {{implicit deduction guide
}}
45 template <typename T
> struct D
{ // cxx20-note 6 {{candidate}} cxx17-note 8 {{candidate}} \
46 cxx20
-note
6 {{implicit deduction guide
}} cxx17
-note
8 {{implicit deduction guide
}}
51 C c1
= {1, 2}; // expected-error {{no viable}}
52 C c2
= {1, 2, 3}; // expected-error {{no viable}}
53 C c3
= {{1u, 2u}, 3}; // cxx17-error {{no viable}}
55 C
c4(1, 2); // expected-error {{no viable}}
56 C
c5(1, 2, 3); // expected-error {{no viable}}
57 C
c6({1u, 2u}, 3); // cxx17-error {{no viable}}
59 D d1
= {1, 2}; // expected-error {{no viable}}
60 D d2
= {1, 2, 3}; // cxx17-error {{no viable}}
62 D
d3(1, 2); // expected-error {{no viable}}
63 // CTAD succeed but brace elision is not allowed for parenthesized aggregate init.
64 D
d4(1, 2, 3); // expected-error {{no viable}}
66 // CHECK-LABEL: Dumping Basic::<deduction guide for C>:
67 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for C>
68 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
69 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for C> 'auto (S<T>, T) -> C<T>'
70 // CHECK: | |-ParmVarDecl {{.*}} 'S<T>'
71 // CHECK: | `-ParmVarDecl {{.*}} 'T'
72 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for C> 'auto (S<int>, int) -> Basic::C<int>'
73 // CHECK: |-TemplateArgument type 'int'
74 // CHECK: | `-BuiltinType {{.*}} 'int'
75 // CHECK: |-ParmVarDecl {{.*}} 'S<int>':'Basic::S<int>'
76 // CHECK: `-ParmVarDecl {{.*}} 'int'
77 // CHECK: FunctionProtoType {{.*}} 'auto (S<T>, T) -> C<T>' dependent trailing_return cdecl
78 // CHECK: |-InjectedClassNameType {{.*}} 'C<T>' dependent
79 // CHECK: | `-CXXRecord {{.*}} 'C'
80 // CHECK: |-ElaboratedType {{.*}} 'S<T>' sugar dependent
81 // CHECK: | `-TemplateSpecializationType {{.*}} 'S<T>' dependent
82 // CHECK: | `-TemplateArgument type 'T'
83 // CHECK: | `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
84 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
85 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
86 // CHECK: `-TemplateTypeParm {{.*}} 'T'
88 // CHECK-LABEL: Dumping Basic::<deduction guide for D>:
89 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for D>
90 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
91 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for D> 'auto (int, int) -> D<T>'
92 // CHECK: |-ParmVarDecl {{.*}} 'int'
93 // CHECK: `-ParmVarDecl {{.*}} 'int'
94 // CHECK: FunctionProtoType {{.*}} 'auto (int, int) -> D<T>' dependent trailing_return cdecl
95 // CHECK: |-InjectedClassNameType {{.*}} 'D<T>' dependent
96 // CHECK: | `-CXXRecord {{.*}} 'D'
97 // CHECK: |-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T
98 // CHECK: | |-ClassTemplateSpecialization {{.*}} 'S'
99 // CHECK: | `-BuiltinType {{.*}} 'int'
100 // CHECK: `-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T
101 // CHECK: |-ClassTemplateSpecialization {{.*}} 'S'
102 // CHECK: `-BuiltinType {{.*}} 'int'
104 template <typename T
> struct E
{ // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}
109 E e1
= {1, 2}; // cxx17-error {{no viable}}
111 E
e2(1, 2); // cxx17-error {{no viable}}
113 // CHECK-LABEL: Dumping Basic::<deduction guide for E>:
114 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for E>
115 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
116 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for E> 'auto (T, decltype(t)) -> E<T>'
117 // CHECK: | |-ParmVarDecl {{.*}} 'T'
118 // CHECK: | `-ParmVarDecl {{.*}} 'decltype(t)'
119 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for E> 'auto (int, decltype(t)) -> Basic::E<int>'
120 // CHECK: |-TemplateArgument type 'int'
121 // CHECK: | `-BuiltinType {{.*}} 'int'
122 // CHECK: |-ParmVarDecl {{.*}} 'int'
123 // CHECK: `-ParmVarDecl {{.*}} 'decltype(t)':'int'
124 // CHECK: FunctionProtoType {{.*}} 'auto (T, decltype(t)) -> E<T>' dependent trailing_return cdecl
125 // CHECK: |-InjectedClassNameType {{.*}} 'E<T>' dependent
126 // CHECK: | `-CXXRecord {{.*}} 'E'
127 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
128 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
129 // CHECK: `-DecltypeType {{.*}} 'decltype(t)' dependent
130 // CHECK: `-DeclRefExpr {{.*}} 'T' lvalue Field {{.*}} 't' 'T' non_odr_use_unevaluated
132 template <typename T
>
137 template <typename T
>
138 struct F
{ // cxx17-note 2 {{candidate}} cxx17-note 2 {{implicit deduction guide}}
139 typename I
<T
>::type i
;
143 F f1
= {1, 2}; // cxx17-error {{no viable}}
145 // CHECK-LABEL: Dumping Basic::<deduction guide for F>:
146 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>
147 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
148 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (typename I<T>::type, T) -> F<T>'
149 // CHECK: | |-ParmVarDecl {{.*}} 'typename I<T>::type'
150 // CHECK: | `-ParmVarDecl {{.*}} 'T'
151 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F> 'auto (typename I<int>::type, int) -> Basic::F<int>'
152 // CHECK: |-TemplateArgument type 'int'
153 // CHECK: | `-BuiltinType {{.*}} 'int'
154 // CHECK: |-ParmVarDecl {{.*}} 'typename I<int>::type':'int'
155 // CHECK: `-ParmVarDecl {{.*}} 'int'
156 // CHECK: FunctionProtoType {{.*}} 'auto (typename I<T>::type, T) -> F<T>' dependent trailing_return cdecl
157 // CHECK: |-InjectedClassNameType {{.*}} 'F<T>' dependent
158 // CHECK: | `-CXXRecord {{.*}} 'F'
159 // CHECK: |-DependentNameType {{.*}} 'typename I<T>::type' dependent
160 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
161 // CHECK: `-TemplateTypeParm {{.*}} 'T'
165 typedef unsigned long size_t;
166 template <typename T
, size_t N
> struct A
{ // cxx20-note 2 {{candidate}} cxx17-note 14 {{candidate}} \
167 cxx20
-note
2 {{implicit deduction guide
}} cxx17
-note
14 {{implicit deduction guide
}}
171 A a1
= {{1, 2, 3}}; // cxx17-error {{no viable}}
172 A a2
= {1, 2, 3}; // expected-error {{no viable}}
173 A a3
= {"meow"}; // cxx17-error {{no viable}}
174 A a4
= {("meow")}; // cxx17-error {{no viable}}
176 A
a5({1, 2, 3}); // cxx17-error {{no viable}}
177 A
a6("meow"); // cxx17-error {{no viable}}
178 A
a7(("meow")); // cxx17-error {{no viable}}
180 // CHECK-LABEL: Dumping Array::<deduction guide for A>:
181 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
182 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
183 // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N
184 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T (&&)[N]) -> A<T, N>'
185 // CHECK: | `-ParmVarDecl {{.*}} 'T (&&)[N]'
186 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int (&&)[3]) -> Array::A<int, 3>'
187 // CHECK: |-TemplateArgument type 'int'
188 // CHECK: | `-BuiltinType {{.*}} 'int'
189 // CHECK: |-TemplateArgument integral '3UL'
190 // CHECK: `-ParmVarDecl {{.*}} 'int (&&)[3]'
191 // CHECK: FunctionProtoType {{.*}} 'auto (T (&&)[N]) -> A<T, N>' dependent trailing_return cdecl
192 // CHECK: |-InjectedClassNameType {{.*}} 'A<T, N>' dependent
193 // CHECK: | `-CXXRecord {{.*}} 'A'
194 // CHECK: `-RValueReferenceType {{.*}} 'T (&&)[N]' dependent
195 // CHECK: `-DependentSizedArrayType {{.*}} 'T[N]' dependent
196 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
197 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
198 // CHECK: `-DeclRefExpr {{.*}} 'size_t':'unsigned {{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned {{.*}}'
200 // CHECK: Dumping Array::<deduction guide for A>:
201 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
202 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
203 // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N
204 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (const T (&)[N]) -> A<T, N>'
205 // CHECK: | `-ParmVarDecl {{.*}} 'const T (&)[N]'
206 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (const char (&)[5]) -> Array::A<char, 5>'
207 // CHECK: |-TemplateArgument type 'char'
208 // CHECK: | `-BuiltinType {{.*}} 'char'
209 // CHECK: |-TemplateArgument integral '5UL'
210 // CHECK: `-ParmVarDecl {{.*}} 'const char (&)[5]'
211 // CHECK: FunctionProtoType {{.*}} 'auto (const T (&)[N]) -> A<T, N>' dependent trailing_return cdecl
212 // CHECK: |-InjectedClassNameType {{.*}} 'A<T, N>' dependent
213 // CHECK: | `-CXXRecord {{.*}} 'A'
214 // CHECK: `-LValueReferenceType {{.*}} 'const T (&)[N]' dependent
215 // CHECK: `-QualType {{.*}} 'const T[N]' const
216 // CHECK: `-DependentSizedArrayType {{.*}} 'T[N]' dependent
217 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
218 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
219 // CHECK: `-DeclRefExpr {{.*}} 'size_t':'unsigned{{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned{{.*}}'
222 namespace BraceElision
{
223 template <typename T
> struct A
{ // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}
227 A a1
= {0, 1}; // cxx17-error {{no viable}}
229 // CTAD succeed but brace elision is not allowed for parenthesized aggregate init.
230 A
a2(0, 1); // cxx20-error {{array initializer must be an initializer list}} cxx17-error {{no viable}}
232 // CHECK-LABEL: Dumping BraceElision::<deduction guide for A>:
233 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
234 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
235 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T, T) -> A<T>'
236 // CHECK: | |-ParmVarDecl {{.*}} 'T'
237 // CHECK: | `-ParmVarDecl {{.*}} 'T'
238 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int, int) -> BraceElision::A<int>'
239 // CHECK: |-TemplateArgument type 'int'
240 // CHECK: | `-BuiltinType {{.*}} 'int'
241 // CHECK: |-ParmVarDecl {{.*}} 'int'
242 // CHECK: `-ParmVarDecl {{.*}} 'int'
243 // CHECK: FunctionProtoType {{.*}} 'auto (T, T) -> A<T>' dependent trailing_return cdecl
244 // CHECK: |-InjectedClassNameType {{.*}} 'A<T>' dependent
245 // CHECK: | `-CXXRecord {{.*}} 'A'
246 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
247 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
248 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
249 // CHECK: `-TemplateTypeParm {{.*}} 'T'
252 namespace TrailingPack
{
253 template<typename
... T
> struct A
: T
... { // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}
256 A a1
= { // cxx17-error {{no viable}}
261 A
a2( // cxx17-error {{no viable}}
266 // CHECK-LABEL: Dumping TrailingPack::<deduction guide for A>:
267 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
268 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T
269 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T...) -> A<T...>'
270 // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack
271 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A>
272 // CHECK-SAME: 'auto (TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})) ->
273 // CHECK-SAME: TrailingPack::A<TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})>'
274 // CHECK: |-TemplateArgument pack
275 // CHECK: | |-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'
276 // CHECK: | | `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'
277 // CHECK: | | `-CXXRecord {{.*}} ''
278 // CHECK: | `-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'
279 // CHECK: | `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'
280 // CHECK: | `-CXXRecord {{.*}} ''
281 // CHECK: |-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'
282 // CHECK: `-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'
283 // CHECK: FunctionProtoType {{.*}} 'auto (T...) -> A<T...>' dependent trailing_return cdecl
284 // CHECK: |-InjectedClassNameType {{.*}} 'A<T...>' dependent
285 // CHECK: | `-CXXRecord {{.*}} 'A'
286 // CHECK: `-PackExpansionType {{.*}} 'T...' dependent
287 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
288 // CHECK: `-TemplateTypeParm {{.*}} 'T'
291 namespace NonTrailingPack
{
292 template<typename
... T
> struct A
: T
... { // expected-note 4 {{candidate}} expected-note 4 {{implicit deduction guide}}
296 A a1
= { // expected-error {{no viable}}
301 A
a2( // expected-error {{no viable}}
307 namespace DeduceArity
{
308 template <typename
... T
> struct Types
{};
309 template <typename
... T
> struct F
: Types
<T
...>, T
... {}; // cxx20-note 12 {{candidate}} cxx17-note 16 {{candidate}} \
310 cxx20
-note
12 {{implicit deduction guide
}} cxx17
-note
16 {{implicit deduction guide
}}
315 struct W
{ operator Y(); };
317 F f1
= {Types
<X
, Y
, Z
>{}, {}, {}}; // cxx17-error {{no viable}}
318 F f2
= {Types
<X
, Y
, Z
>{}, X
{}, Y
{}}; // cxx17-error {{no viable}}
319 F f3
= {Types
<X
, Y
, Z
>{}, X
{}, W
{}}; // expected-error {{no viable}}
320 F f4
= {Types
<X
>{}, {}, {}}; // expected-error {{no viable}}
322 F
f5(Types
<X
, Y
, Z
>{}, {}, {}); // cxx17-error {{no viable}}
323 F
f6(Types
<X
, Y
, Z
>{}, X
{}, Y
{}); // cxx17-error {{no viable}}
324 F
f7(Types
<X
, Y
, Z
>{}, X
{}, W
{}); // expected-error {{no viable}}
325 F
f8(Types
<X
>{}, {}, {}); // expected-error {{no viable}}
327 // CHECK-LABEL: Dumping DeduceArity::<deduction guide for F>:
328 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>
329 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T
330 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<T...>, T...) -> F<T...>'
331 // CHECK: | |-ParmVarDecl {{.*}} 'Types<T...>'
332 // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack
333 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F>
334 // CHECK-SAME: 'auto (Types<X, Y, Z>, DeduceArity::X, DeduceArity::Y, DeduceArity::Z) ->
335 // CHECK-SAME: DeduceArity::F<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'
336 // CHECK: | |-TemplateArgument pack
337 // CHECK: | | |-TemplateArgument type 'DeduceArity::X'
338 // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::X'
339 // CHECK: | | | `-CXXRecord {{.*}} 'X'
340 // CHECK: | | |-TemplateArgument type 'DeduceArity::Y'
341 // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::Y'
342 // CHECK: | | | `-CXXRecord {{.*}} 'Y'
343 // CHECK: | | `-TemplateArgument type 'DeduceArity::Z'
344 // CHECK: | | `-RecordType {{.*}} 'DeduceArity::Z'
345 // CHECK: | | `-CXXRecord {{.*}} 'Z'
346 // CHECK: | |-ParmVarDecl {{.*}} 'Types<X, Y, Z>':'DeduceArity::Types<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'
347 // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::X'
348 // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::Y'
349 // CHECK: | `-ParmVarDecl {{.*}} 'DeduceArity::Z'
350 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<X>, DeduceArity::X) -> DeduceArity::F<DeduceArity::X>'
351 // CHECK: |-TemplateArgument pack
352 // CHECK: | `-TemplateArgument type 'DeduceArity::X'
353 // CHECK: | `-RecordType {{.*}} 'DeduceArity::X'
354 // CHECK: | `-CXXRecord {{.*}} 'X'
355 // CHECK: |-ParmVarDecl {{.*}} 'Types<X>':'DeduceArity::Types<DeduceArity::X>'
356 // CHECK: `-ParmVarDecl {{.*}} 'DeduceArity::X'
357 // CHECK: FunctionProtoType {{.*}} 'auto (Types<T...>, T...) -> F<T...>' dependent trailing_return cdecl
358 // CHECK: |-InjectedClassNameType {{.*}} 'F<T...>' dependent
359 // CHECK: | `-CXXRecord {{.*}} 'F'
360 // CHECK: |-ElaboratedType {{.*}} 'Types<T...>' sugar dependent
361 // CHECK: | `-TemplateSpecializationType {{.*}} 'Types<T...>' dependent
362 // CHECK: | `-TemplateArgument type 'T...'
363 // CHECK: | `-PackExpansionType {{.*}} 'T...' dependent
364 // CHECK: | `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
365 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
366 // CHECK: `-PackExpansionType {{.*}} 'T...' dependent
367 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
368 // CHECK: `-TemplateTypeParm {{.*}} 'T'