[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 7 16:49:39 PST 2024


HighCommander4 wrote:

> The branch is **not** taken most of the time (it's only taken for calls to functions with an explicit object argument, which is a C++23 feature), so perhaps annotating the branch as "unlikely" is sufficient to avoid the performance regression?

Ah, no, that's not sufficient because it takes some work (a call to `getCalleeDecl()`) to compute the branch condition.

We could consider revising the implementation approach to optimize this better; for example, add a "uses explicit object argument" bit to `CallExprBits`?

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


More information about the cfe-commits mailing list