[PATCH] D155898: [clangd] Fix go-to-type target location
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 14:04:32 PDT 2023
sammccall marked an inline comment as done.
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:347
+void enhanceLocatedSymbolsFromIndex(
+ llvm::MutableArrayRef<LocatedSymbol> Result,
+ const llvm::DenseMap<SymbolID, size_t> &ResultIndex,
----------------
usaxena95 wrote:
> nit: ResultIndex looks like an implementation detail of this function and the callers do not need it. SymbolID is already present as LocatedSymbol::ID so we can compute this map in this function itself.
Nice catch! We were in fact computing all the symbol ids twice, too..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155898/new/
https://reviews.llvm.org/D155898
More information about the cfe-commits
mailing list