================ @@ -971,9 +971,12 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // this may happen while we're comparing two templates' constraint // equivalence. LocalInstantiationScope ScopeForParameters(S); - if (auto *FD = DeclInfo.getDecl()->getAsFunction()) - for (auto *PVD : FD->parameters()) - ScopeForParameters.InstantiatedLocal(PVD, PVD); + if (const NamedDecl *D = DeclInfo.getDecl()) { + const FunctionDecl *FD = D->getAsFunction(); ---------------- zyn0217 wrote:
(I roughly explained in the comment.) This function `SubstituteConstraintExpressionWithoutSatisfaction` would be called in the context where a template parameter list is getting parsed, when the template declaration that the template parameter list would attach to is not yet available. https://github.com/llvm/llvm-project/pull/102587 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits