[clang] [clang] Fix couroutine error for operator new. (PR #215619)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 05:33:19 PDT 2026


================
@@ -1488,6 +1488,8 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
     if (FoundAllocations) {
       IAP = FoundAllocations->IAP;
       OperatorNew = FoundAllocations->OperatorNew;
+    } else {
+      OperatorNew = nullptr;
----------------
cor3ntin wrote:

I wonder if we can refactor LookupAllocationFunction so that it doesn't mutate state and/or add a comment.
at the very least I think LookupAllocationFunction should capture `OperatorNew` explicitly.

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


More information about the cfe-commits mailing list