[clang-tools-extra] [clangd] Add inlay hints for forwarding direct init (PR #176635)
Tobias Ribizel via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 01:46:57 PST 2026
https://github.com/upsj requested changes to this pull request.
I am wondering whether this new interface to resolveForwardingParameters is generic enough - what if you have a function that - through multiple forwarding layers chipping away at parameters from the front - passes some of the arguments to a class initializer list, but some others to regular parameters? Wouldn't it make more sense to use a `SmallVector<variant<ParmVarDecl, FieldDecl>>` and resolve them individually?
Also, this looks like it would fail if we are also initializing base class fields, e.g.
```
struct A {
int a;
};
struct B : A {
int b;
};
auto b = std::make_unique<B>(1, 2);
```
I think something like this would also be a good test case to add.
https://github.com/llvm/llvm-project/pull/176635
More information about the cfe-commits
mailing list