[clang-tools-extra] [clangd] Navigate go-to-definition through forwarding wrappers to the constructor (PR #199480)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 06:47:48 PDT 2026
================
@@ -1115,5 +1115,21 @@ searchConstructorsInForwardingFunction(const FunctionDecl *FD) {
return Result;
}
+ArrayRef<const CXXConstructorDecl *>
----------------
timon-ul wrote:
I thought about this return type for a while, the main issue I personally had with it is that the caller `findIndirectConstructors` turns this back into a vector. I mean we expect these vectors to have 1 element only so a copy is probably pretty cheap (also I am unsure how much more overhead it is than creating an `ArrayRef`), that being said I think using this is fine, but then `findIndirectConstructors`, which is the same use case as the other callers just with 1 more layer of function in between should also just return a reference to make this more coherent. (Sorry for commenting here and not where I expect the change oops)
https://github.com/llvm/llvm-project/pull/199480
More information about the cfe-commits
mailing list