[clang-tools-extra] clangd: Extend reference search with constructor calls through forwarding (PR #169742)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 10:32:25 PST 2025
timon-ul wrote:
> restricting the matches to constructor calls that occur in a `new` expression for now
Yeah makes sense.
> handle chained forwarding functions
I was thinking about this too, will for sure work on this as a followup task, seems a bit complicated again though, I think I now have to track where the parameter pack is going?
> we'll want some caching
I can't believe I forgot about the cache again....
> keeping around a `SmallSet<FunctionDecl*> SeenForwardingFuncInstances`
Is this right? Shouldn't it be a map mapping the declaration to the constructors? Because if I run across for example `make_unique<Foo>` a 2nd time I indeed do not need to traverse its body again, but I still need to record the current location as a reference to the constructor of `Foo`, right?
https://github.com/llvm/llvm-project/pull/169742
More information about the cfe-commits
mailing list