[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 5 06:36:39 PDT 2025


HighCommander4 wrote:

> Though part of me is curious about which bug was caught :)

The bug was that [this branch](https://github.com/HighCommander4/llvm-project/blob/2211dbf5b3167797ec2e5bf4db5adc13427d3e7b/clang/lib/Sema/HeuristicResolver.cpp#L522) was using `Fn` (before `IgnoreParenCasts` unwrapping) rather than `NakedFn` (after `IgnoreParenCasts` unwrapping). The CodeComplete call site is passing in an expression that is already subject to `IgnoreParenCasts` unwrapping, so it was fine, but the InlayHints call site was not, and so parameter hints were not shown for calls through a struct member of function pointer type.

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


More information about the cfe-commits mailing list