================ @@ -1397,12 +1415,25 @@ namespace { ArrayRef<UnexpandedParameterPack> Unexpanded, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) { - return getSema().CheckParameterPacksForExpansion(EllipsisLoc, - PatternRange, Unexpanded, - TemplateArgs, - ShouldExpand, - RetainExpansion, - NumExpansions); + if (ParameterInstantiationScope) { + for (UnexpandedParameterPack ParmPack : Unexpanded) { + NamedDecl *VD = ParmPack.first.dyn_cast<NamedDecl *>(); + if (!VD) + continue; + if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD); + PVD && + PVD->getDeclContext() == + FunctionDCForParameterDeclInstantiation && + !ParameterInstantiationScope->findInstantiationUnsafe(PVD)) { + // Fall through to the default lookup even if we have failed to + // instantiate anything. We're likely to crash thereafter. + instantiateParameterToScope(PVD, *ParameterInstantiationScope); ---------------- zyn0217 wrote:
We now fail on that https://github.com/llvm/llvm-project/pull/102857 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits