ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land.
Thanks, that's a nice find! Could you also add a test that mentions uses `consteval` functions in lambda captures inside immediate invocations? Something like `consteval_foo([x = consteval_foo(1)]() consteval { return x; })` and maybe also without `consteval` on lambda parameter list. I suspect this should work as expected, just wanted to make sure we capture this in tests ================ Comment at: clang/docs/ReleaseNotes.rst:196 + +- Skip re-building lambda expressions when they appear as parameters to an immediate invocation. + This fixes `GH56183 <https://github.com/llvm/llvm-project/issues/56183>`_, ---------------- NIT ================ Comment at: clang/lib/Sema/SemaExpr.cpp:17601-17605 + ExprResult TransformLambdaExpr(LambdaExpr *E) { + // Lambdas must be built already. They must not be re-built as it always + // creates new types. + return E; + } ---------------- NIT: I tried to expand the meaning of term 'built' to make the comment a bit clearer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132945/new/ https://reviews.llvm.org/D132945 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits