[clang] [Clang] Fix -Wunused-parameter for implicit coroutine uses (PR #217518)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 23 23:09:42 PDT 2026


================
@@ -556,6 +562,7 @@ VarDecl *Sema::buildCoroutinePromise(SourceLocation Loc) {
         VD->setInit(MaybeCreateExprWithCleanups(Result.get()));
         VD->setInitStyle(VarDecl::CallInit);
         CheckCompleteVariableDeclaration(VD);
+        markCoroutineParametersReferenced(*FD);
----------------
ChuanqiXu9 wrote:

Sorry I still don't understand it. Could you clarify what would happen if we don't do so? And how can it solve the problem?

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


More information about the cfe-commits mailing list