danix800 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); ---------------- tbaeder wrote: > Why `getBeginLoc()` and not `getEndLoc()`? Aha! Thinko I guess. Previously I noticed that expr of single ID only tracks its begin loc (end loc == begin loc). So the `getBeginLoc()`. But for composite expr it's not the case, end loc == last single ID's begin loc. Here last arg could be a composite expr too and `getEndLoc()` should be used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157296/new/ https://reviews.llvm.org/D157296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits