[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 05:06:53 PDT 2024


================
@@ -136,6 +155,11 @@ namespace {
     /// do not contain unexpanded parameter packs.
     bool TraverseStmt(Stmt *S) {
       Expr *E = dyn_cast_or_null<Expr>(S);
+
+      llvm::SaveAndRestore _(InConstraint);
+      if (CurrentFunction && CurrentFunction->getTrailingRequiresClause() == S)
+        InConstraint = true;
+
----------------
cor3ntin wrote:

Do we have tests for a lambda (potentially constrained?) used in a requires clause of another function?

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


More information about the cfe-commits mailing list