Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / aggregate-deduction-candidate.cpp
blob7f535651bb81572810a6b59c84cc413448f79856
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
4 namespace Basic {
5 template<class T> struct A { // cxx17-note 6 {{candidate}}
6 T x;
7 T y;
8 };
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}}
35 T x;
36 T y;
39 template <typename T> struct C { // cxx20-note 10 {{candidate}} cxx17-note 12 {{candidate}}
40 S<T> s;
41 T t;
44 template <typename T> struct D { // cxx20-note 6 {{candidate}} cxx17-note 8 {{candidate}}
45 S<int> s;
46 T t;
49 C c1 = {1, 2}; // expected-error {{no viable}}
50 C c2 = {1, 2, 3}; // expected-error {{no viable}}
51 C c3 = {{1u, 2u}, 3}; // cxx17-error {{no viable}}
53 C c4(1, 2); // expected-error {{no viable}}
54 C c5(1, 2, 3); // expected-error {{no viable}}
55 C c6({1u, 2u}, 3); // cxx17-error {{no viable}}
57 D d1 = {1, 2}; // expected-error {{no viable}}
58 D d2 = {1, 2, 3}; // cxx17-error {{no viable}}
60 D d3(1, 2); // expected-error {{no viable}}
61 // CTAD succeed but brace elision is not allowed for parenthesized aggregate init.
62 D d4(1, 2, 3); // expected-error {{no viable}}
64 // CHECK-LABEL: Dumping Basic::<deduction guide for C>:
65 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for C>
66 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
67 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for C> 'auto (S<T>, T) -> C<T>'
68 // CHECK: | |-ParmVarDecl {{.*}} 'S<T>'
69 // CHECK: | `-ParmVarDecl {{.*}} 'T'
70 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for C> 'auto (S<int>, int) -> Basic::C<int>'
71 // CHECK: |-TemplateArgument type 'int'
72 // CHECK: | `-BuiltinType {{.*}} 'int'
73 // CHECK: |-ParmVarDecl {{.*}} 'S<int>':'Basic::S<int>'
74 // CHECK: `-ParmVarDecl {{.*}} 'int'
75 // CHECK: FunctionProtoType {{.*}} 'auto (S<T>, T) -> C<T>' dependent trailing_return cdecl
76 // CHECK: |-InjectedClassNameType {{.*}} 'C<T>' dependent
77 // CHECK: | `-CXXRecord {{.*}} 'C'
78 // CHECK: |-ElaboratedType {{.*}} 'S<T>' sugar dependent
79 // CHECK: | `-TemplateSpecializationType {{.*}} 'S<T>' dependent S
80 // CHECK: | `-TemplateArgument type 'T'
81 // CHECK: | `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
82 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
83 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
84 // CHECK: `-TemplateTypeParm {{.*}} 'T'
86 // CHECK-LABEL: Dumping Basic::<deduction guide for D>:
87 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for D>
88 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
89 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for D> 'auto (int, int) -> D<T>'
90 // CHECK: |-ParmVarDecl {{.*}} 'int'
91 // CHECK: `-ParmVarDecl {{.*}} 'int'
92 // CHECK: FunctionProtoType {{.*}} 'auto (int, int) -> D<T>' dependent trailing_return cdecl
93 // CHECK: |-InjectedClassNameType {{.*}} 'D<T>' dependent
94 // CHECK: | `-CXXRecord {{.*}} 'D'
95 // CHECK: |-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T
96 // CHECK: | |-ClassTemplateSpecialization {{.*}} 'S'
97 // CHECK: | `-BuiltinType {{.*}} 'int'
98 // CHECK: `-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T
99 // CHECK: |-ClassTemplateSpecialization {{.*}} 'S'
100 // CHECK: `-BuiltinType {{.*}} 'int'
102 template <typename T> struct E { // cxx17-note 4 {{candidate}}
103 T t;
104 decltype(t) t2;
107 E e1 = {1, 2}; // cxx17-error {{no viable}}
109 E e2(1, 2); // cxx17-error {{no viable}}
111 // CHECK-LABEL: Dumping Basic::<deduction guide for E>:
112 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for E>
113 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
114 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for E> 'auto (T, decltype(t)) -> E<T>'
115 // CHECK: | |-ParmVarDecl {{.*}} 'T'
116 // CHECK: | `-ParmVarDecl {{.*}} 'decltype(t)'
117 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for E> 'auto (int, decltype(t)) -> Basic::E<int>'
118 // CHECK: |-TemplateArgument type 'int'
119 // CHECK: | `-BuiltinType {{.*}} 'int'
120 // CHECK: |-ParmVarDecl {{.*}} 'int'
121 // CHECK: `-ParmVarDecl {{.*}} 'decltype(t)':'int'
122 // CHECK: FunctionProtoType {{.*}} 'auto (T, decltype(t)) -> E<T>' dependent trailing_return cdecl
123 // CHECK: |-InjectedClassNameType {{.*}} 'E<T>' dependent
124 // CHECK: | `-CXXRecord {{.*}} 'E'
125 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
126 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
127 // CHECK: `-DecltypeType {{.*}} 'decltype(t)' dependent
128 // CHECK: `-DeclRefExpr {{.*}} 'T' lvalue Field {{.*}} 't' 'T' non_odr_use_unevaluated
130 template <typename T>
131 struct I {
132 using type = T;
135 template <typename T>
136 struct F { // cxx17-note 2 {{candidate}}
137 typename I<T>::type i;
138 T t;
141 F f1 = {1, 2}; // cxx17-error {{no viable}}
143 // CHECK-LABEL: Dumping Basic::<deduction guide for F>:
144 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>
145 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
146 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (typename I<T>::type, T) -> F<T>'
147 // CHECK: | |-ParmVarDecl {{.*}} 'typename I<T>::type'
148 // CHECK: | `-ParmVarDecl {{.*}} 'T'
149 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F> 'auto (typename I<int>::type, int) -> Basic::F<int>'
150 // CHECK: |-TemplateArgument type 'int'
151 // CHECK: | `-BuiltinType {{.*}} 'int'
152 // CHECK: |-ParmVarDecl {{.*}} 'typename I<int>::type':'int'
153 // CHECK: `-ParmVarDecl {{.*}} 'int'
154 // CHECK: FunctionProtoType {{.*}} 'auto (typename I<T>::type, T) -> F<T>' dependent trailing_return cdecl
155 // CHECK: |-InjectedClassNameType {{.*}} 'F<T>' dependent
156 // CHECK: | `-CXXRecord {{.*}} 'F'
157 // CHECK: |-DependentNameType {{.*}} 'typename I<T>::type' dependent
158 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
159 // CHECK: `-TemplateTypeParm {{.*}} 'T'
162 namespace Array {
163 typedef __SIZE_TYPE__ size_t;
164 template <typename T, size_t N> struct A { // cxx20-note 2 {{candidate}} cxx17-note 14 {{candidate}}
165 T array[N];
168 A a1 = {{1, 2, 3}}; // cxx17-error {{no viable}}
169 A a2 = {1, 2, 3}; // expected-error {{no viable}}
170 A a3 = {"meow"}; // cxx17-error {{no viable}}
171 A a4 = {("meow")}; // cxx17-error {{no viable}}
173 A a5({1, 2, 3}); // cxx17-error {{no viable}}
174 A a6("meow"); // cxx17-error {{no viable}}
175 A a7(("meow")); // cxx17-error {{no viable}}
177 // CHECK-LABEL: Dumping Array::<deduction guide for A>:
178 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
179 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
180 // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N
181 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T (&&)[N]) -> A<T, N>'
182 // CHECK: | `-ParmVarDecl {{.*}} 'T (&&)[N]'
183 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int (&&)[3]) -> Array::A<int, 3>'
184 // CHECK: |-TemplateArgument type 'int'
185 // CHECK: | `-BuiltinType {{.*}} 'int'
186 // CHECK: |-TemplateArgument integral 3
187 // CHECK: `-ParmVarDecl {{.*}} 'int (&&)[3]'
188 // CHECK: FunctionProtoType {{.*}} 'auto (T (&&)[N]) -> A<T, N>' dependent trailing_return cdecl
189 // CHECK: |-InjectedClassNameType {{.*}} 'A<T, N>' dependent
190 // CHECK: | `-CXXRecord {{.*}} 'A'
191 // CHECK: `-RValueReferenceType {{.*}} 'T (&&)[N]' dependent
192 // CHECK: `-DependentSizedArrayType {{.*}} 'T[N]' dependent
193 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
194 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
195 // CHECK: `-DeclRefExpr {{.*}} 'size_t':'unsigned {{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned {{.*}}'
197 // CHECK: Dumping Array::<deduction guide for A>:
198 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
199 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
200 // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N
201 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (const T (&)[N]) -> A<T, N>'
202 // CHECK: | `-ParmVarDecl {{.*}} 'const T (&)[N]'
203 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (const char (&)[5]) -> Array::A<char, 5>'
204 // CHECK: |-TemplateArgument type 'char'
205 // CHECK: | `-BuiltinType {{.*}} 'char'
206 // CHECK: |-TemplateArgument integral 5
207 // CHECK: `-ParmVarDecl {{.*}} 'const char (&)[5]'
208 // CHECK: FunctionProtoType {{.*}} 'auto (const T (&)[N]) -> A<T, N>' dependent trailing_return cdecl
209 // CHECK: |-InjectedClassNameType {{.*}} 'A<T, N>' dependent
210 // CHECK: | `-CXXRecord {{.*}} 'A'
211 // CHECK: `-LValueReferenceType {{.*}} 'const T (&)[N]' dependent
212 // CHECK: `-QualType {{.*}} 'const T[N]' const
213 // CHECK: `-DependentSizedArrayType {{.*}} 'T[N]' dependent
214 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
215 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
216 // CHECK: `-DeclRefExpr {{.*}} 'size_t':'unsigned{{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned{{.*}}'
219 namespace BraceElision {
220 template <typename T> struct A { // cxx17-note 4 {{candidate}}
221 T array[2];
224 A a1 = {0, 1}; // cxx17-error {{no viable}}
226 // CTAD succeed but brace elision is not allowed for parenthesized aggregate init.
227 A a2(0, 1); // cxx20-error {{array initializer must be an initializer list}} cxx17-error {{no viable}}
229 // CHECK-LABEL: Dumping BraceElision::<deduction guide for A>:
230 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
231 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T
232 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T, T) -> A<T>'
233 // CHECK: | |-ParmVarDecl {{.*}} 'T'
234 // CHECK: | `-ParmVarDecl {{.*}} 'T'
235 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int, int) -> BraceElision::A<int>'
236 // CHECK: |-TemplateArgument type 'int'
237 // CHECK: | `-BuiltinType {{.*}} 'int'
238 // CHECK: |-ParmVarDecl {{.*}} 'int'
239 // CHECK: `-ParmVarDecl {{.*}} 'int'
240 // CHECK: FunctionProtoType {{.*}} 'auto (T, T) -> A<T>' dependent trailing_return cdecl
241 // CHECK: |-InjectedClassNameType {{.*}} 'A<T>' dependent
242 // CHECK: | `-CXXRecord {{.*}} 'A'
243 // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
244 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
245 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0
246 // CHECK: `-TemplateTypeParm {{.*}} 'T'
249 namespace TrailingPack {
250 template<typename... T> struct A : T... { // cxx17-note 4 {{candidate}}
253 A a1 = { // cxx17-error {{no viable}}
254 []{ return 1; },
255 []{ return 2; }
258 A a2( // cxx17-error {{no viable}}
259 []{ return 1; },
260 []{ return 2; }
263 // CHECK-LABEL: Dumping TrailingPack::<deduction guide for A>:
264 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>
265 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T
266 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T...) -> A<T...>'
267 // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack
268 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A>
269 // CHECK-SAME: 'auto (TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})) ->
270 // CHECK-SAME: TrailingPack::A<TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})>'
271 // CHECK: |-TemplateArgument pack
272 // CHECK: | |-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'
273 // CHECK: | | `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'
274 // CHECK: | | `-CXXRecord {{.*}} ''
275 // CHECK: | `-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'
276 // CHECK: | `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'
277 // CHECK: | `-CXXRecord {{.*}} ''
278 // CHECK: |-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'
279 // CHECK: `-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'
280 // CHECK: FunctionProtoType {{.*}} 'auto (T...) -> A<T...>' dependent trailing_return cdecl
281 // CHECK: |-InjectedClassNameType {{.*}} 'A<T...>' dependent
282 // CHECK: | `-CXXRecord {{.*}} 'A'
283 // CHECK: `-PackExpansionType {{.*}} 'T...' dependent
284 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
285 // CHECK: `-TemplateTypeParm {{.*}} 'T'
288 namespace NonTrailingPack {
289 template<typename... T> struct A : T... { // expected-note 4 {{candidate}}
290 int a;
293 A a1 = { // expected-error {{no viable}}
294 []{ return 1; },
295 []{ return 2; }
298 A a2( // expected-error {{no viable}}
299 []{ return 1; },
300 []{ return 2; }
304 namespace DeduceArity {
305 template <typename... T> struct Types {};
306 template <typename... T> struct F : Types<T...>, T... {}; // cxx20-note 12 {{candidate}} cxx17-note 16 {{candidate}}
308 struct X {};
309 struct Y {};
310 struct Z {};
311 struct W { operator Y(); };
313 F f1 = {Types<X, Y, Z>{}, {}, {}}; // cxx17-error {{no viable}}
314 F f2 = {Types<X, Y, Z>{}, X{}, Y{}}; // cxx17-error {{no viable}}
315 F f3 = {Types<X, Y, Z>{}, X{}, W{}}; // expected-error {{no viable}}
316 F f4 = {Types<X>{}, {}, {}}; // expected-error {{no viable}}
318 F f5(Types<X, Y, Z>{}, {}, {}); // cxx17-error {{no viable}}
319 F f6(Types<X, Y, Z>{}, X{}, Y{}); // cxx17-error {{no viable}}
320 F f7(Types<X, Y, Z>{}, X{}, W{}); // expected-error {{no viable}}
321 F f8(Types<X>{}, {}, {}); // expected-error {{no viable}}
323 // CHECK-LABEL: Dumping DeduceArity::<deduction guide for F>:
324 // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>
325 // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T
326 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<T...>, T...) -> F<T...>'
327 // CHECK: | |-ParmVarDecl {{.*}} 'Types<T...>'
328 // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack
329 // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F>
330 // CHECK-SAME: 'auto (Types<X, Y, Z>, DeduceArity::X, DeduceArity::Y, DeduceArity::Z) ->
331 // CHECK-SAME: DeduceArity::F<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'
332 // CHECK: | |-TemplateArgument pack
333 // CHECK: | | |-TemplateArgument type 'DeduceArity::X'
334 // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::X'
335 // CHECK: | | | `-CXXRecord {{.*}} 'X'
336 // CHECK: | | |-TemplateArgument type 'DeduceArity::Y'
337 // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::Y'
338 // CHECK: | | | `-CXXRecord {{.*}} 'Y'
339 // CHECK: | | `-TemplateArgument type 'DeduceArity::Z'
340 // CHECK: | | `-RecordType {{.*}} 'DeduceArity::Z'
341 // CHECK: | | `-CXXRecord {{.*}} 'Z'
342 // CHECK: | |-ParmVarDecl {{.*}} 'Types<X, Y, Z>':'DeduceArity::Types<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'
343 // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::X'
344 // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::Y'
345 // CHECK: | `-ParmVarDecl {{.*}} 'DeduceArity::Z'
346 // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<X>, DeduceArity::X) -> DeduceArity::F<DeduceArity::X>'
347 // CHECK: |-TemplateArgument pack
348 // CHECK: | `-TemplateArgument type 'DeduceArity::X'
349 // CHECK: | `-RecordType {{.*}} 'DeduceArity::X'
350 // CHECK: | `-CXXRecord {{.*}} 'X'
351 // CHECK: |-ParmVarDecl {{.*}} 'Types<X>':'DeduceArity::Types<DeduceArity::X>'
352 // CHECK: `-ParmVarDecl {{.*}} 'DeduceArity::X'
353 // CHECK: FunctionProtoType {{.*}} 'auto (Types<T...>, T...) -> F<T...>' dependent trailing_return cdecl
354 // CHECK: |-InjectedClassNameType {{.*}} 'F<T...>' dependent
355 // CHECK: | `-CXXRecord {{.*}} 'F'
356 // CHECK: |-ElaboratedType {{.*}} 'Types<T...>' sugar dependent
357 // CHECK: | `-TemplateSpecializationType {{.*}} 'Types<T...>' dependent Types
358 // CHECK: | `-TemplateArgument type 'T...'
359 // CHECK: | `-PackExpansionType {{.*}} 'T...' dependent
360 // CHECK: | `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
361 // CHECK: | `-TemplateTypeParm {{.*}} 'T'
362 // CHECK: `-PackExpansionType {{.*}} 'T...' dependent
363 // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack
364 // CHECK: `-TemplateTypeParm {{.*}} 'T'