[PATCH] D116443: [clangd] Implement textDocument/typeDefinition
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 14 01:03:46 PDT 2022
kadircet added inline comments.
Herald added a project: All.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1292
+ for (const LocatedSymbol &Sym : *Types)
+ Response.push_back(Sym.PreferredDeclaration);
+ return Reply(std::move(Response));
----------------
any particular reason for jumping to declaration here, rather than using definition when it's available or was this just an oversight?
because this results in us jumping to forward declarations every now and then, and I can't see any use case where a declaration would be preferred to definition of a type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116443/new/
https://reviews.llvm.org/D116443
More information about the cfe-commits
mailing list