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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to