[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-14 Thread Eric Liu via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-14 Thread Eric Liu via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-14 Thread Eric Liu via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-13 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-13 Thread Eric Liu via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-13 Thread Eric Liu via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-12 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D44305: [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.

2018-03-09 Thread Eric Liu via Phabricator via cfe-commits
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.