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

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 19:05:36 PDT 2026


================
@@ -1444,6 +1456,7 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
 
   FunctionDecl *OperatorNew = nullptr;
   SmallVector<Expr *, 1> PlacementArgs;
+  bool PlacementArgsAreCoroutineParameters = false;
----------------
Lane0218 wrote:

Yes, the state is needed to track the provenance of `PlacementArgs`. The arguments may later be replaced with `{std::nothrow}` in the non-throwing fallback, so a non-empty `PlacementArgs` does not necessarily contain coroutine parameters.

The variable was renamed to `PlacementArgsFromCoroutine` to make this distinction clearer.

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


More information about the cfe-commits mailing list