[PATCH] D38425: [clangd] Document highlights for clangd

William Enright via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 10:38:33 PDT 2017


Nebiroth marked 3 inline comments as done.
Nebiroth added inline comments.


================
Comment at: clangd/ClangdUnit.cpp:1017
+
+  auto DeclLocationsFinder = std::make_shared<TargetDeclarationFinder>(
+      llvm::errs(), SourceLocationBeg, AST.getASTContext(),
----------------
ilya-biryukov wrote:
> I wonder if we really need to rerun indexer twice here. Probably ok for the first version, but we should definitely think about a faster way to get the `Decl` under cursor than visiting the whole AST. Not sure if it's easy to do with clang's AST, though, maybe we'll need a separate index for that.
Yeah I realise it's definitely not the fastest way to go about it. Maybe there is a way to stop handling occurrences once the highlighted declaration is found. This would be the most straightforward way of improving the performance of the feature without re-writing a new AST indexer.


https://reviews.llvm.org/D38425





More information about the cfe-commits mailing list