Issue |
143240
|
Summary |
Unify getPrototypeLoc functions in InlayHints.cpp and SemaCodeComplete.cpp
|
Labels |
clangd
|
Assignees |
HighCommander4
|
Reporter |
HighCommander4
|
We have two almost-identical utility functions, [`getPrototypeLoc()`](https://searchfox.org/llvm/rev/269c29ae67e54bd3243535a7c58d0f30d1eb9036/clang-tools-extra/clangd/InlayHints.cpp#345) in `clang-tools-extra/clangd/InlayHints.cpp` and [`GetPrototypeLoc()`](https://searchfox.org/llvm/rev/269c29ae67e54bd3243535a7c58d0f30d1eb9036/clang/lib/Sema/SemaCodeComplete.cpp#6289) 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).
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs