================
@@ -1650,8 +1667,11 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
isAlignedAllocation(IAP.PassAlignment))
NewArgs.push_back(FrameAlignment);
- if (OperatorNew->getNumParams() > NewArgs.size())
+ if (OperatorNew->getNumParams() > NewArgs.size()) {
llvm::append_range(NewArgs, PlacementArgs);
+ if (PlacementArgsAreCoroutineParameters)
+ markCoroutineParametersReferenced(FD);
----------------
Lane0218 wrote:
Yes, this is a real case. `getNumParams()` does not include the ellipsis, so
the old condition skipped the coroutine placement arguments for `operator
new(size_t, ...)`.
The condition now also checks `OperatorNew->isVariadic()`, with a regression
test covering this case.
https://github.com/llvm/llvm-project/pull/217518
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits