File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -5788,13 +5788,14 @@ struct CXXNameMangler::TemplateArgManglingInfo {
5788
5788
" no parameter for argument" );
5789
5789
Param = ResolvedTemplate->getTemplateParameters ()->getParam (ParamIdx);
5790
5790
5791
- // If we reach an expanded parameter pack whose argument isn't in pack
5792
- // form, that means Sema couldn't figure out which arguments belonged to
5793
- // it, because it contains a pack expansion. Track the expanded pack for
5794
- // all further template arguments until we hit that pack expansion.
5791
+ // If we reach a parameter pack whose argument isn't in pack form, that
5792
+ // means Sema couldn't or didn't figure out which arguments belonged to
5793
+ // it, because it contains a pack expansion or because Sema bailed out of
5794
+ // computing parameter / argument correspondence before this point. Track
5795
+ // the pack as the corresponding parameter for all further template
5796
+ // arguments until we hit a pack expansion, at which point we don't know
5797
+ // the correspondence between parameters and arguments at all.
5795
5798
if (Param->isParameterPack () && Arg.getKind () != TemplateArgument::Pack) {
5796
- assert (getExpandedPackSize (Param) &&
5797
- " failed to form pack argument for parameter pack" );
5798
5799
UnresolvedExpandedPack = Param;
5799
5800
}
5800
5801
}
Original file line number Diff line number Diff line change @@ -220,3 +220,11 @@ namespace test7 {
220
220
}
221
221
template void f<int >();
222
222
}
223
+
224
+ namespace gh67244 {
225
+ template <typename T, typename ...Ts> constexpr bool B = true ;
226
+ template <typename T, typename ...Ts> concept C = B<T, Ts...>;
227
+ template <C<int , float > T> void f (T) {}
228
+ // CHECK: define {{.*}} @_ZN7gh672441fITkNS_1CIifEEiEEvT_(
229
+ template void f (int );
230
+ }
You can’t perform that action at this time.
0 commit comments