llvm-project
f0bbae66 - [clangd] Navigate go-to-definition through forwarding wrappers to the constructor (#199480)

Commit
30 days ago
[clangd] Navigate go-to-definition through forwarding wrappers to the constructor (#199480) When the user invokes **Go to Definition** on a call like `std::make_unique<T>(args...)` or `std::make_shared<T>(args...)`, surface the constructor of `T` that is actually invoked inside the wrapper, alongside the wrapper itself. The constructor is added before the wrapper so LSP clients that auto-jump to the first target land on it; clients that present a menu still let the user reach the wrapper. This is the forward-direction counterpart to the find-references work in #169742 (clangd/clangd#716): the same `isLikelyForwardingFunction` + `searchConstructorsInForwardingFunction` machinery, applied to `locateASTReferent`.
Author
Parents
Loading