Description
We have two almost-identical utility functions, getPrototypeLoc()
in clang-tools-extra/clangd/InlayHints.cpp
and GetPrototypeLoc()
in clang/lib/Sema/SemaCodeComplete.cpp
.
To avoid code duplication and divergence in behaviour, we should unify them.
I think HeuristicResolver
is a good place for a common implementation, as it fits the profile of what these functions are doing (trying to recover a FunctionProtoTypeLoc
from a call expression on a best-effort basis).