Lines Matching full:pack

347           // template <class... Pack> struct S {  in HandleFunctionTemplateDecl()
350 // template <class... Pack> template <class T> in HandleFunctionTemplateDecl()
352 // They're of kind TemplateArgument::Pack, not of in HandleFunctionTemplateDecl()
354 // void S<Pack...>::foo() {} in HandleFunctionTemplateDecl()
360 // for unexpanded parameters should be of a Pack kind. in HandleFunctionTemplateDecl()
1384 std::optional<unsigned> getPackIndex(TemplateArgument Pack) { in getPackIndex() argument
1388 return Pack.pack_size() - 1 - Index; in getPackIndex()
1404 void ExpandingFunctionParameterPack(ParmVarDecl *Pack) { in ExpandingFunctionParameterPack() argument
1405 SemaRef.CurrentInstantiationScope->MakeInstantiatedLocalArgPack(Pack); in ExpandingFunctionParameterPack()
1457 "should only have multiple expansions for a pack"); in transformedLocalDecl()
1546 /// Transform a reference to a function or init-capture parameter pack.
1550 /// expand a function parameter pack reference which refers to an expanded
1551 /// pack.
1579 // Override the default version to handle a rewrite-template-arg-pack case
1587 case TemplateArgument::Pack: in TransformTemplateArgument()
1588 // Literally rewrite the template argument pack, instead of unpacking in TransformTemplateArgument()
1590 for (auto &pack : Arg.getPackAsArray()) { in TransformTemplateArgument() local
1592 pack, QualType(), SourceLocation{}); in TransformTemplateArgument()
1632 /// Transforms an already-substituted template type parameter pack
1633 /// into either itself (if we aren't substituting into its pack expansion)
1827 assert(Arg.getKind() == TemplateArgument::Pack && in TransformDecl()
1828 "Missing argument pack"); in TransformDecl()
1878 assert(Arg.getKind() == TemplateArgument::Pack && in TransformFirstQualifierInScope()
1879 "Missing argument pack"); in TransformFirstQualifierInScope()
1976 if (Arg.getKind() == TemplateArgument::Pack) { in TransformTemplateName()
1978 "unexpected pack arguments in template rewrite"); in TransformTemplateName()
1990 assert(Arg.getKind() == TemplateArgument::Pack && in TransformTemplateName()
1991 "Missing argument pack"); in TransformTemplateName()
1994 // We have the template argument pack to substitute, but we're not in TransformTemplateName()
1995 // actually expanding the enclosing pack expansion yet. So, just in TransformTemplateName()
1996 // keep the entire argument pack. in TransformTemplateName()
2020 TemplateArgument Pack = SubstPack->getArgumentPack(); in TransformTemplateName() local
2022 getPackSubstitutedTemplateArgument(getSema(), Pack).getAsTemplate(); in TransformTemplateName()
2027 getPackIndex(Pack)); in TransformTemplateName()
2059 if (Arg.getKind() == TemplateArgument::Pack) { in TransformTemplateParmRefExpr()
2061 "unexpected pack arguments in template rewrite"); in TransformTemplateParmRefExpr()
2074 assert(Arg.getKind() == TemplateArgument::Pack && in TransformTemplateParmRefExpr()
2075 "Missing argument pack"); in TransformTemplateParmRefExpr()
2078 // We have an argument pack, but we can't select a particular argument in TransformTemplateParmRefExpr()
2080 // argument pack. in TransformTemplateParmRefExpr()
2247 // We aren't expanding the parameter pack, so just return ourselves. in TransformSubstNonTypeTemplateParmPackExpr()
2251 TemplateArgument Pack = E->getArgumentPack(); in TransformSubstNonTypeTemplateParmPackExpr() local
2252 TemplateArgument Arg = getPackSubstitutedTemplateArgument(getSema(), Pack); in TransformSubstNonTypeTemplateParmPackExpr()
2256 E->getParameterPackLocation(), Arg, getPackIndex(Pack)); in TransformSubstNonTypeTemplateParmPackExpr()
2311 // We can expand this parameter pack now. in TransformFunctionParmPackExpr()
2348 assert(Found && "no instantiation for parameter pack"); in TransformFunctionParmPackRefExpr()
2351 if (DeclArgumentPack *Pack = Found->dyn_cast<DeclArgumentPack *>()) { in TransformFunctionParmPackRefExpr() local
2352 // If this is a reference to a function parameter pack which we can in TransformFunctionParmPackRefExpr()
2359 E->getExprLoc(), *Pack); in TransformFunctionParmPackRefExpr()
2364 TransformedDecl = (*Pack)[getSema().ArgumentPackSubstitutionIndex]; in TransformFunctionParmPackRefExpr()
2369 // We have either an unexpanded pack or a specific expansion. in TransformFunctionParmPackRefExpr()
2482 if (Arg.getKind() == TemplateArgument::Pack) { in TransformTemplateTypeParmType()
2484 "unexpected pack arguments in template rewrite"); in TransformTemplateTypeParmType()
2498 assert(Arg.getKind() == TemplateArgument::Pack && in TransformTemplateTypeParmType()
2499 "Missing argument pack"); in TransformTemplateTypeParmType()
2502 // We have the template argument pack, but we're not expanding the in TransformTemplateTypeParmType()
2503 // enclosing pack expansion yet. Just save the template argument in TransformTemplateTypeParmType()
2504 // pack for later substitution. in TransformTemplateTypeParmType()
2550 // We aren't expanding the parameter pack, so just return ourselves. in TransformSubstTemplateTypeParmPackType()
2561 TemplateArgument Pack = T->getArgumentPack(); in TransformSubstTemplateTypeParmPackType() local
2562 TemplateArgument Arg = getPackSubstitutedTemplateArgument(getSema(), Pack); in TransformSubstTemplateTypeParmPackType()
2565 getPackIndex(Pack), Arg, TL.getNameLoc()); in TransformSubstTemplateTypeParmPackType()
3078 // We have a function parameter pack. Substitute into the pattern of the in SubstParmVarDecl()
3087 // our function parameter is still a function parameter pack. in SubstParmVarDecl()
3088 // Therefore, make its type a pack expansion type. in SubstParmVarDecl()
3092 // We expected to get a parameter pack but didn't (because the type in SubstParmVarDecl()
3093 // itself is not a pack expansion type), so complain. This can occur when in SubstParmVarDecl()
3095 // pack expansion. in SubstParmVarDecl()
3170 // Add the new parameter to the instantiated parameter pack. in SubstParmVarDecl()
3316 // This is a pack expansion. See whether we should expand it now, or in SubstBaseSpecifiers()
3334 // If we should expand this pack expansion now, do so. in SubstBaseSpecifiers()
3363 // The resulting base specifier will (still) be a pack expansion. in SubstBaseSpecifiers()
4422 } else if (DeclArgumentPack *Pack = Stored.dyn_cast<DeclArgumentPack *>()) { in InstantiatedLocal() local
4423 Pack->push_back(cast<VarDecl>(Inst)); in InstantiatedLocal()
4432 DeclArgumentPack *Pack = LocalDecls[D].get<DeclArgumentPack *>(); in InstantiatedLocalPackArg() local
4433 Pack->push_back(Inst); in InstantiatedLocalPackArg()
4442 "Creating local pack after instantiation of local"); in MakeInstantiatedLocalArgPack()
4447 DeclArgumentPack *Pack = new DeclArgumentPack; in MakeInstantiatedLocalArgPack() local
4448 Stored = Pack; in MakeInstantiatedLocalArgPack()
4449 ArgumentPacks.push_back(Pack); in MakeInstantiatedLocalArgPack()
4453 for (DeclArgumentPack *Pack : ArgumentPacks) in isLocalPackExpansion()
4454 if (llvm::is_contained(*Pack, D)) in isLocalPackExpansion()
4459 void LocalInstantiationScope::SetPartiallySubstitutedPack(NamedDecl *Pack, in SetPartiallySubstitutedPack() argument
4462 assert((!PartiallySubstitutedPack || PartiallySubstitutedPack == Pack) && in SetPartiallySubstitutedPack()
4463 "Already have a partially-substituted pack"); in SetPartiallySubstitutedPack()
4466 "Wrong number of arguments in partially-substituted pack"); in SetPartiallySubstitutedPack()
4467 PartiallySubstitutedPack = Pack; in SetPartiallySubstitutedPack()