================ @@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; + // Preserve the referenced state for unused parameter diagnostics. + bool DeclReferenced = PD->isReferenced(); ---------------- ChuanqiXu9 wrote:
Since we will construct the parameter moves at the very beginning of the coroutine function, I am wondering if it is really possible that `PD->isReferenced()` may be true now. And if it is not possible, we should convert it to `assert(!PD->isReferenced());`. Please changing this after verifying this with some actual coroutine related workloads. https://github.com/llvm/llvm-project/pull/70973 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits