================
@@ -1763,9 +1763,34 @@ namespace {
           if (TA.isDependent())
             return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent;
       }
+      if (auto *CD = dyn_cast_if_present<ImplicitConceptSpecializationDecl>(
+              LSI->Lambda->getLambdaContextDecl())) {
+        if (llvm::any_of(CD->getTemplateArguments(),
+                         [](const auto &TA) { return TA.isDependent(); }))
+          return CXXRecordDecl::LambdaDependencyKind::LDK_AlwaysDependent;
+      }
       return inherited::ComputeLambdaDependency(LSI);
     }
 
+    AssociatedConstraint TransformConstraint(AssociatedConstraint AC) {
+      // If the concept refers to any outer parameter packs, we track the
+      // SubstIndex for evaluation.
+      if (AC && AC.ConstraintExpr->containsUnexpandedParameterPack() &&
+          !AC.ArgPackSubstIndex)
+        AC.ArgPackSubstIndex = SemaRef.ArgPackSubstIndex;
----------------
mizvekov wrote:

As far as I remember when I implemented this, this `ArgPackSubstIndex` should 
track what index was used to expand this constraint, so I think it only makes 
sense to change this when the constraint is actually transformed.

https://github.com/llvm/llvm-project/pull/195995
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to