[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 10:03:05 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:321
 
-  return S.BuildCallExpr(nullptr, Result.get(), Loc, Args, Loc, nullptr);
+  auto EndLoc = Args.empty() ? Loc : Args.back()->getBeginLoc();
+  return S.BuildCallExpr(nullptr, Result.get(), Loc, Args, EndLoc, nullptr);
----------------
Why `getBeginLoc()` and not `getEndLoc()`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157296/new/

https://reviews.llvm.org/D157296



More information about the cfe-commits mailing list