[clang] Reapply "[Clang] Transform lambda's constraints when instantiating parameter mapping (PR #207966)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 19:22:17 PDT 2026


================
@@ -1002,8 +1005,13 @@ ExprResult ConstraintSatisfactionChecker::EvaluateSlow(
       const_cast<NamedDecl *>(Template), Constraint.getSourceRange());
 
   TemplateArgumentListInfo OutArgs(Ori->LAngleLoc, Ori->RAngleLoc);
-  if (S.SubstTemplateArguments(Ori->arguments(), *SubstitutedArgs, OutArgs) ||
-      Trap.hasErrorOccurred()) {
+
+  if (ConceptId == TopLevelConceptId) {
----------------
zyn0217 wrote:

TopLevelConceptId is only set when we evaluate the constraint from user-written concepts directly and therefore it's unnecessary to substitute into parameter mapping because they're actually the same thing (both the parameter mapping and the user written template arguments come from the user-written template arguments, see CheckConceptTemplateId)

https://github.com/llvm/llvm-project/pull/207966


More information about the cfe-commits mailing list