File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,12 @@ class HashParameterMapping : public RecursiveASTVisitor<HashParameterMapping> {
277277 bool VisitTemplateTypeParmType (TemplateTypeParmType *T) {
278278 // A lambda expression can introduce template parameters that don't have
279279 // corresponding template arguments yet.
280- if (T->getDepth () >= TemplateArgs.getNumLevels () ||
281- !TemplateArgs.hasTemplateArgument (T->getDepth (), T->getIndex ()))
280+ if (T->getDepth () >= TemplateArgs.getNumLevels ())
281+ return true ;
282+
283+ // There might not be a corresponding template argument before substituting
284+ // into the parameter mapping, e.g. a sizeof... expression.
285+ if (!TemplateArgs.hasTemplateArgument (T->getDepth (), T->getIndex ()))
282286 return true ;
283287
284288 TemplateArgument Arg = TemplateArgs (T->getDepth (), T->getIndex ());
Original file line number Diff line number Diff line change @@ -1434,7 +1434,7 @@ template<typename, typename... Ts>
14341434concept true_types = true_int<sizeof ...(Ts), void >;
14351435
14361436template <typename , typename ... Ts>
1437- concept true_types2 = true_int<Ts...[0 ]{1 }, void >;
1437+ concept true_types2 = true_int<Ts...[0 ]{1 }, void >; // cxx20-warning {{pack indexing is a C++2c extension}}
14381438
14391439template <typename ... Ts>
14401440struct s {
You can’t perform that action at this time.
0 commit comments