This revision was automatically updated to reflect the committed changes.
Closed by commit rL327487: [clangd] Add an interface that finds symbol by
SymbolID in SymbolIndex. (authored by ioeric, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
ioeric updated this revision to Diff 138313.
ioeric marked 5 inline comments as done.
ioeric added a comment.
- Addressed review comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44305
Files:
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
clangd/index/Index.h
ioeric added inline comments.
Comment at: clangd/index/Merge.cpp:69
+ else
+B.insert(mergeSymbol(*Sym, S, ));
+});
sammccall wrote:
> This could also just be callback(mergeSymbol(...)), if we keep track of the
> IDs we've emitted.
> This way
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/index/Index.h:253
+struct LookupRequest {
+ std::set IDs;
+};
nit: DenseSet? we already have the traits
ioeric added a comment.
Thanks for the review!
Comment at: clangd/index/Index.h:268
+ virtual bool
+ getSymbol(const SymbolID ,
+llvm::function_ref Callback) const = 0;
sammccall wrote:
> sammccall wrote:
> > sammccall
ioeric updated this revision to Diff 138204.
ioeric marked 6 inline comments as done.
ioeric added a comment.
- - Addressed review comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44305
Files:
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
sammccall added a comment.
Thanks for doing this! Some quibbles about the interface, but this makes index
useful for lots more features.
Comment at: clangd/index/Index.h:268
+ virtual bool
+ getSymbol(const SymbolID ,
+llvm::function_ref
ioeric created this revision.
ioeric added a reviewer: sammccall.
Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek.
Potential use case: argument go-to-definition result with symbol
information (e.g. function definition in cc file) that might not be in the AST.