================ @@ -1881,6 +1871,15 @@ Decl *TemplateInstantiator::TransformDecl(SourceLocation Loc, Decl *D) { TemplateArgument Arg = TemplateArgs(TTP->getDepth(), TTP->getPosition()); if (TTP->isParameterPack()) { + // We might not have an index for pack expansion when normalizing + // constraint expressions. In that case, resort to instantiation scopes + // for the transformed declarations. + if (SemaRef.ArgumentPackSubstitutionIndex == -1 && + SemaRef.CodeSynthesisContexts.back().Kind == + Sema::CodeSynthesisContext::ConstraintNormalization) { + return SemaRef.FindInstantiatedDecl(Loc, cast<NamedDecl>(D), + TemplateArgs); ---------------- mizvekov wrote:
Why don't we have an index in these cases? Is this something we could fix in the future? https://github.com/llvm/llvm-project/pull/115120 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits