brintos

brintos / llvm-project-archived public Read only

0
0
Text · 18.6 KiB · bf153b2 Raw
368 lines · cpp
1// RUN: %clang_cc1 -std=c++17 -verify=expected,cxx17 %s2// RUN: %clang_cc1 -std=c++20 -verify=expected,cxx20 -ast-dump -ast-dump-decl-types -ast-dump-filter "deduction guide" %s | FileCheck %s --strict-whitespace3 4namespace Basic {5  template<class T> struct A { // cxx17-note 6 {{candidate}} cxx17-note 6 {{implicit deduction guide}}6    T x;7    T y;8  };9 10  A a1 = {3.0, 4.0}; // cxx17-error {{no viable}}11  A a2 = {.x = 3.0, .y = 4.0}; // cxx17-error {{no viable}}12 13  A a3(3.0, 4.0); // cxx17-error {{no viable}}14 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 T18  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T, T) -> Basic::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) -> Basic::A<T>' dependent trailing_return cdecl27  // CHECK: |-InjectedClassNameType {{.*}} 'Basic::A<T>' dependent28  // CHECK: | `-CXXRecord {{.*}} 'A'29  // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 030  // CHECK: | `-TemplateTypeParm {{.*}} 'T'31  // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 032  // CHECK:   `-TemplateTypeParm {{.*}} 'T'33 34  template <typename T> struct S { // cxx20-note 2 {{candidate}}35    T x;36    T y;37  };38 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}}41    S<T> s;42    T t;43  };44 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}}47    S<int> s;48    T t;49  };50 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}}54 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}}58 59  D d1 = {1, 2}; // expected-error {{no viable}}60  D d2 = {1, 2, 3}; // cxx17-error {{no viable}}61 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}}65 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 T69  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for C> 'auto (S<T>, T) -> Basic::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) -> Basic::C<T>' dependent trailing_return cdecl78  // CHECK: |-InjectedClassNameType {{.*}} 'Basic::C<T>' dependent79  // CHECK: | `-CXXRecord {{.*}} 'C'80  // CHECK: |-TemplateSpecializationType {{.*}} 'S<T>' dependent81  // CHECK: | `-TemplateArgument type 'T'82  // CHECK: |   `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 083  // CHECK: |     `-TemplateTypeParm {{.*}} 'T'84  // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 085  // CHECK:   `-TemplateTypeParm {{.*}} 'T'86 87  // CHECK-LABEL: Dumping Basic::<deduction guide for D>:88  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for D>89  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T90  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for D> 'auto (int, int) -> Basic::D<T>'91  // CHECK:   |-ParmVarDecl {{.*}} 'int'92  // CHECK:   `-ParmVarDecl {{.*}} 'int'93  // CHECK: FunctionProtoType {{.*}} 'auto (int, int) -> Basic::D<T>' dependent trailing_return cdecl94  // CHECK: |-InjectedClassNameType {{.*}} 'Basic::D<T>' dependent95  // CHECK: | `-CXXRecord {{.*}} 'D'96  // CHECK: |-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T97  // CHECK: | |-ClassTemplateSpecialization {{.*}} 'S'98  // CHECK: | `-BuiltinType {{.*}} 'int'99  // CHECK: `-SubstTemplateTypeParmType {{.*}} 'int' sugar typename depth 0 index 0 T100  // CHECK:   |-ClassTemplateSpecialization {{.*}} 'S'101  // CHECK:   `-BuiltinType {{.*}} 'int'102 103  template <typename T> struct E { // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}104    T t;105    decltype(t) t2;106  };107 108  E e1 = {1, 2}; // cxx17-error {{no viable}}109 110  E e2(1, 2); // cxx17-error {{no viable}}111 112  // CHECK-LABEL: Dumping Basic::<deduction guide for E>:113  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for E>114  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T115  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for E> 'auto (T, decltype(t)) -> Basic::E<T>'116  // CHECK: | |-ParmVarDecl {{.*}} 'T'117  // CHECK: | `-ParmVarDecl {{.*}} 'decltype(t)'118  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for E> 'auto (int, decltype(t)) -> Basic::E<int>'119  // CHECK:   |-TemplateArgument type 'int'120  // CHECK:   | `-BuiltinType {{.*}} 'int'121  // CHECK:   |-ParmVarDecl {{.*}} 'int'122  // CHECK:   `-ParmVarDecl {{.*}} 'decltype(t)':'int'123  // CHECK: FunctionProtoType {{.*}} 'auto (T, decltype(t)) -> Basic::E<T>' dependent trailing_return cdecl124  // CHECK: |-InjectedClassNameType {{.*}} 'Basic::E<T>' dependent125  // CHECK: | `-CXXRecord {{.*}} 'E'126  // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0127  // CHECK: | `-TemplateTypeParm {{.*}} 'T'128  // CHECK: `-DecltypeType {{.*}} 'decltype(t)' dependent129  // CHECK:   `-DeclRefExpr {{.*}} 'T' lvalue Field {{.*}} 't' 'T' non_odr_use_unevaluated130 131  template <typename T>132  struct I {133    using type = T;134  };135 136  template <typename T>137  struct F { // cxx17-note 2 {{candidate}} cxx17-note 2 {{implicit deduction guide}}138    typename I<T>::type i;139    T t;140  };141 142  F f1 = {1, 2}; // cxx17-error {{no viable}}143 144  // CHECK-LABEL: Dumping Basic::<deduction guide for F>:145  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>146  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T147  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (typename I<T>::type, T) -> Basic::F<T>'148  // CHECK: | |-ParmVarDecl {{.*}} 'typename I<T>::type'149  // CHECK: | `-ParmVarDecl {{.*}} 'T'150  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F> 'auto (typename I<int>::type, int) -> Basic::F<int>'151  // CHECK:   |-TemplateArgument type 'int'152  // CHECK:   | `-BuiltinType {{.*}} 'int'153  // CHECK:   |-ParmVarDecl {{.*}} 'typename I<int>::type':'int'154  // CHECK:   `-ParmVarDecl {{.*}} 'int'155  // CHECK: FunctionProtoType {{.*}} 'auto (typename I<T>::type, T) -> Basic::F<T>' dependent trailing_return cdecl156  // CHECK: |-InjectedClassNameType {{.*}} 'Basic::F<T>' dependent157  // CHECK: | `-CXXRecord {{.*}} 'F'158  // CHECK: |-DependentNameType {{.*}} 'typename I<T>::type' dependent159  // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0160  // CHECK:   `-TemplateTypeParm {{.*}} 'T'161}162 163namespace Array {164  typedef unsigned long size_t;165  template <typename T, size_t N> struct A { // cxx20-note 2 {{candidate}} cxx17-note 14 {{candidate}} \166                                                cxx20-note 2 {{implicit deduction guide}} cxx17-note 14 {{implicit deduction guide}}167    T array[N];168  };169 170  A a1 = {{1, 2, 3}}; // cxx17-error {{no viable}}171  A a2 = {1, 2, 3}; // expected-error {{no viable}}172  A a3 = {"meow"}; // cxx17-error {{no viable}}173  A a4 = {("meow")}; // cxx17-error {{no viable}}174 175  A a5({1, 2, 3}); // cxx17-error {{no viable}}176  A a6("meow"); // cxx17-error {{no viable}}177  A a7(("meow")); // cxx17-error {{no viable}}178 179  // CHECK-LABEL: Dumping Array::<deduction guide for A>:180  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>181  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T182  // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N183  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T (&&)[N]) -> Array::A<T, N>'184  // CHECK: | `-ParmVarDecl {{.*}} 'T (&&)[N]'185  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int (&&)[3]) -> Array::A<int, 3>'186  // CHECK:   |-TemplateArgument type 'int'187  // CHECK:   | `-BuiltinType {{.*}} 'int'188  // CHECK:   |-TemplateArgument integral '3UL'189  // CHECK:   `-ParmVarDecl {{.*}} 'int (&&)[3]'190  // CHECK: FunctionProtoType {{.*}} 'auto (T (&&)[N]) -> Array::A<T, N>' dependent trailing_return cdecl191  // CHECK: |-InjectedClassNameType {{.*}} 'Array::A<T, N>' dependent192  // CHECK: | `-CXXRecord {{.*}} 'A'193  // CHECK: `-RValueReferenceType {{.*}} 'T (&&)[N]' dependent194  // CHECK:   `-DependentSizedArrayType {{.*}} 'T[N]' dependent195  // CHECK:     |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0196  // CHECK:     | `-TemplateTypeParm {{.*}} 'T'197  // CHECK:     `-DeclRefExpr {{.*}} 'size_t':'unsigned {{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned {{.*}}'198 199  // CHECK: Dumping Array::<deduction guide for A>:200  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>201  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T202  // CHECK: |-NonTypeTemplateParmDecl {{.*}} 'size_t':'unsigned {{.*}}' depth 0 index 1 N203  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (const T (&)[N]) -> Array::A<T, N>'204  // CHECK: | `-ParmVarDecl {{.*}} 'const T (&)[N]'205  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (const char (&)[5]) -> Array::A<char, 5>'206  // CHECK:   |-TemplateArgument type 'char'207  // CHECK:   | `-BuiltinType {{.*}} 'char'208  // CHECK:   |-TemplateArgument integral '5UL'209  // CHECK:   `-ParmVarDecl {{.*}} 'const char (&)[5]'210  // CHECK: FunctionProtoType {{.*}} 'auto (const T (&)[N]) -> Array::A<T, N>' dependent trailing_return cdecl211  // CHECK: |-InjectedClassNameType {{.*}} 'Array::A<T, N>' dependent212  // CHECK: | `-CXXRecord {{.*}} 'A'213  // CHECK: `-LValueReferenceType {{.*}} 'const T (&)[N]' dependent214  // CHECK:   `-QualType {{.*}} 'const T[N]' const215  // CHECK:     `-DependentSizedArrayType {{.*}} 'T[N]' dependent216  // CHECK:       |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0217  // CHECK:       | `-TemplateTypeParm {{.*}} 'T'218  // CHECK:       `-DeclRefExpr {{.*}} 'size_t':'unsigned{{.*}}' NonTypeTemplateParm {{.*}} 'N' 'size_t':'unsigned{{.*}}'219}220 221namespace BraceElision {222  template <typename T> struct A { // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}223    T array[2];224  };225 226  A a1 = {0, 1}; // cxx17-error {{no viable}}227 228  // CTAD succeed but brace elision is not allowed for parenthesized aggregate init.229  A a2(0, 1); // cxx20-error {{array initializer must be an initializer list}} cxx17-error {{no viable}}230 231  // CHECK-LABEL: Dumping BraceElision::<deduction guide for A>:232  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>233  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 T234  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T, T) -> BraceElision::A<T>'235  // CHECK: | |-ParmVarDecl {{.*}} 'T'236  // CHECK: | `-ParmVarDecl {{.*}} 'T'237  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A> 'auto (int, int) -> BraceElision::A<int>'238  // CHECK:   |-TemplateArgument type 'int'239  // CHECK:   | `-BuiltinType {{.*}} 'int'240  // CHECK:   |-ParmVarDecl {{.*}} 'int'241  // CHECK:   `-ParmVarDecl {{.*}} 'int'242  // CHECK: FunctionProtoType {{.*}} 'auto (T, T) -> BraceElision::A<T>' dependent trailing_return cdecl243  // CHECK: |-InjectedClassNameType {{.*}} 'BraceElision::A<T>' dependent244  // CHECK: | `-CXXRecord {{.*}} 'A'245  // CHECK: |-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0246  // CHECK: | `-TemplateTypeParm {{.*}} 'T'247  // CHECK: `-TemplateTypeParmType {{.*}} 'T' dependent depth 0 index 0248  // CHECK:   `-TemplateTypeParm {{.*}} 'T'249}250 251namespace TrailingPack {252  template<typename... T> struct A : T... { // cxx17-note 4 {{candidate}} cxx17-note 4 {{implicit deduction guide}}253  };254 255  A a1 = { // cxx17-error {{no viable}}256    []{ return 1; },257    []{ return 2; }258  };259 260  A a2( // cxx17-error {{no viable}}261    []{ return 1; },262    []{ return 2; }263  );264 265  // CHECK-LABEL: Dumping TrailingPack::<deduction guide for A>:266  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for A>267  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T268  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for A> 'auto (T...) -> TrailingPack::A<T...>'269  // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack270  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for A>271  // CHECK-SAME: 'auto (TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})) ->272  // CHECK-SAME:     TrailingPack::A<TrailingPack::(lambda at {{.*}}), TrailingPack::(lambda at {{.*}})>'273  // CHECK: |-TemplateArgument pack274  // CHECK: | |-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'275  // CHECK: | | `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'276  // CHECK: | |   `-CXXRecord {{.*}} <line:261:5>277  // CHECK: | `-TemplateArgument type 'TrailingPack::(lambda at {{.*}})'278  // CHECK: |   `-RecordType {{.*}} 'TrailingPack::(lambda at {{.*}})'279  // CHECK: |     `-CXXRecord {{.*}} <line:262:5>280  // CHECK: |-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'281  // CHECK: `-ParmVarDecl {{.*}} 'TrailingPack::(lambda at {{.*}})'282  // CHECK: FunctionProtoType {{.*}} 'auto (T...) -> TrailingPack::A<T...>' dependent trailing_return cdecl283  // CHECK: |-InjectedClassNameType {{.*}} 'TrailingPack::A<T...>' dependent284  // CHECK: | `-CXXRecord {{.*}} 'A'285  // CHECK: `-PackExpansionType {{.*}} 'T...' dependent286  // CHECK:   `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack287  // CHECK:     `-TemplateTypeParm {{.*}} 'T'288}289 290namespace NonTrailingPack {291  template<typename... T> struct A : T... { // expected-note 4 {{candidate}} expected-note 4 {{implicit deduction guide}}292    int a;293  };294 295  A a1 = { // expected-error {{no viable}}296    []{ return 1; },297    []{ return 2; }298  };299 300  A a2( // expected-error {{no viable}}301    []{ return 1; },302    []{ return 2; }303  );304}305 306namespace DeduceArity {307  template <typename... T> struct Types {};308  template <typename... T> struct F : Types<T...>, T... {}; // cxx20-note 12 {{candidate}} cxx17-note 16 {{candidate}} \309                                                               cxx20-note 12 {{implicit deduction guide}} cxx17-note 16 {{implicit deduction guide}}310 311  struct X {};312  struct Y {};313  struct Z {};314  struct W { operator Y(); };315 316  F f1 = {Types<X, Y, Z>{}, {}, {}}; // cxx17-error {{no viable}}317  F f2 = {Types<X, Y, Z>{}, X{}, Y{}}; // cxx17-error {{no viable}}318  F f3 = {Types<X, Y, Z>{}, X{}, W{}}; // expected-error {{no viable}}319  F f4 = {Types<X>{}, {}, {}}; // expected-error {{no viable}}320 321  F f5(Types<X, Y, Z>{}, {}, {}); // cxx17-error {{no viable}}322  F f6(Types<X, Y, Z>{}, X{}, Y{}); // cxx17-error {{no viable}}323  F f7(Types<X, Y, Z>{}, X{}, W{}); // expected-error {{no viable}}324  F f8(Types<X>{}, {}, {}); // expected-error {{no viable}}325 326  // CHECK-LABEL: Dumping DeduceArity::<deduction guide for F>:327  // CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for F>328  // CHECK: |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 ... T329  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<T...>, T...) -> DeduceArity::F<T...>'330  // CHECK: | |-ParmVarDecl {{.*}} 'Types<T...>'331  // CHECK: | `-ParmVarDecl {{.*}} 'T...' pack332  // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for F>333  // CHECK-SAME:  'auto (Types<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>, DeduceArity::X, DeduceArity::Y, DeduceArity::Z) ->334  // CHECK-SAME:     DeduceArity::F<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'335  // CHECK: | |-TemplateArgument pack336  // CHECK: | | |-TemplateArgument type 'DeduceArity::X'337  // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::X'338  // CHECK: | | |   `-CXXRecord {{.*}} 'X'339  // CHECK: | | |-TemplateArgument type 'DeduceArity::Y'340  // CHECK: | | | `-RecordType {{.*}} 'DeduceArity::Y'341  // CHECK: | | |   `-CXXRecord {{.*}} 'Y'342  // CHECK: | | `-TemplateArgument type 'DeduceArity::Z'343  // CHECK: | |   `-RecordType {{.*}} 'DeduceArity::Z'344  // CHECK: | |     `-CXXRecord {{.*}} 'Z'345  // CHECK: | |-ParmVarDecl {{.*}} 'Types<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>':'DeduceArity::Types<DeduceArity::X, DeduceArity::Y, DeduceArity::Z>'346  // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::X'347  // CHECK: | |-ParmVarDecl {{.*}} 'DeduceArity::Y'348  // CHECK: | `-ParmVarDecl {{.*}} 'DeduceArity::Z'349  // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for F> 'auto (Types<DeduceArity::X>, DeduceArity::X) -> DeduceArity::F<DeduceArity::X>'350  // CHECK:   |-TemplateArgument pack351  // CHECK:   | `-TemplateArgument type 'DeduceArity::X'352  // CHECK:   |   `-RecordType {{.*}} 'DeduceArity::X'353  // CHECK:   |     `-CXXRecord {{.*}} 'X'354  // CHECK:   |-ParmVarDecl {{.*}} 'Types<DeduceArity::X>':'DeduceArity::Types<DeduceArity::X>'355  // CHECK:   `-ParmVarDecl {{.*}} 'DeduceArity::X'356  // CHECK: FunctionProtoType {{.*}} 'auto (Types<T...>, T...) -> DeduceArity::F<T...>' dependent trailing_return cdecl357  // CHECK: |-InjectedClassNameType {{.*}} 'DeduceArity::F<T...>' dependent358  // CHECK: | `-CXXRecord {{.*}} 'F'359  // CHECK: |-TemplateSpecializationType {{.*}} 'Types<T...>' dependent360  // CHECK: | `-TemplateArgument type 'T...'361  // CHECK: |   `-PackExpansionType {{.*}} 'T...' dependent362  // CHECK: |     `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack363  // CHECK: |       `-TemplateTypeParm {{.*}} 'T'364  // CHECK: `-PackExpansionType {{.*}} 'T...' dependent365  // CHECK:   `-TemplateTypeParmType {{.*}} 'T' dependent contains_unexpanded_pack depth 0 index 0 pack366  // CHECK:     `-TemplateTypeParm {{.*}} 'T'367}368