[clang] [clang] Fix lost lambda capture in dependent co_return operand (PR #220234)

Kunal Dubey via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 1 08:04:11 PDT 2026


xakep8 wrote:

> > @avikivity I'd also consider adding this to the test
> > ```c++
> > call([&](auto &t) -> coro_void {
> >     co_await suspend_never{};
> >     co_return use_void(p, t);
> > });
> > ```
> 
> Can you explain why? Does it exercise another path?

Just to keep it consistent with the issue description so that the test cover both mentioned case, eventually we do reach the same path with `co_return` and `co_await` and the current test is already good to prove the fix works.

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


More information about the cfe-commits mailing list