[clang] [Coroutines] Allow [[clang::coro_wrapper]] for class (PR #93268)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 18 02:19:48 PDT 2025
usx95 wrote:
@snarkmaster
> What did you envision the effect of adding `coro_wrapper` to a class would be on lifetime checks?
All coro wrappers continue to participate in lifetime checks (i.e., all params implicitly treated as `lifetimebound`) if not annotated with `coro_disable_lifetimebound`~
```
if (const auto *RD = Callee->getReturnType()->getAsRecordDecl()) {
CheckCoroCall = RD->hasAttr<CoroLifetimeBoundAttr>() &&
RD->hasAttr<CoroReturnTypeAttr>() &&
!Callee->hasAttr<CoroDisableLifetimeBoundAttr>();
}
```
https://github.com/llvm/llvm-project/pull/93268
More information about the cfe-commits
mailing list