[PATCH] D158249: [clangd] Parameter hints for calls through function pointers
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 18 02:07:06 PDT 2023
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:508
+ // Only one of Callee or ProtoTypeLoc is set.
+ const FunctionDecl *Callee = nullptr;
+ FunctionProtoTypeLoc ProtoTypeLoc;
----------------
Calling this "callee" confuses me a bit - originally the callee was an expr and always present, so this must be a different idea: `CalleeDecl`?.
However I also think this struct has an unneccesarily broad scope: we're not really gaining anything by bundling `Args` into it rather than continuing to pass that as a separate param.
This suggests:
```
struct Callee {
Decl *Declaration;
FunctionProtoTypeLoc Loc;
};
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158249/new/
https://reviews.llvm.org/D158249
More information about the cfe-commits
mailing list