[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126919. ioeric marked 3 inline comments as done. ioeric added a comment. - Address more comments. # I am going to land it now. - Merge remote-tracking branch 'origin/master' into index Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Fil

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: unittests/clangd/IndexTests.cpp:29 + +struct SlabAndPointers { + SymbolSlab Slab; this could be local to generateNumSymbols, up to you Comment at: unittests/clangd/

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126917. ioeric marked an inline comment as done. ioeric added a comment. - Fix comment for fuzzyFind Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/index/Index.h clangd/index/MemIndex.cpp cla

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126916. ioeric marked 7 inline comments as done. ioeric added a comment. - Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/index/Index.h clangd/index/MemIndex.cpp clang

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for the split & refactoring! This looks nice. Just nits, plus some thoughts on the test. Comment at: clangd/index/Index.cpp:11 #include "Index.h" - +#include "

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126775. ioeric added a comment. - Remove everything except for SymbolIndex interface and MemIndex - Added unit tests for MemIndex Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/index/Index.cpp

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I think this patch is too big, and there are several separate pieces here: - the index interface, and the implementation of the dynamic symbol index (these probably belong together). We're missing unit tests for the implementation. - building and updating the dynamic

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126686. ioeric added a comment. Merged with origin/master and moved index-related files to index/ subdirectory. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdL

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdIndex.h:1 +//===--- ClangdIndex.h - Symbol indexes for clangd.---*- C++-*-===// +// sammccall wrote: > nit: `Clangd` prefix doesn't do much. > I'd suggest `Index.h` for the interface (including S

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 126379. ioeric marked 8 inline comments as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/

Re: [PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Marc-André Laperle via cfe-commits
o.org; ibiryu...@google.com; cfe-commits@lists.llvm.org Subject: [PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion. hokein added a comment. Thanks for the feedback, Marc! Yeah, I think the ClangdIndexDataSymbol and ClangdIndexDataOccurrence are something similar to

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the feedback, Marc! Yeah, I think the ClangdIndexDataSymbol and ClangdIndexDataOccurrence are something similar to what https://reviews.llvm.org/D40897 trying to address, maybe put the discussion there? Before that, I think having a sym meeting is a good idea

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D40548#949182, @malaperle wrote: > As a follow-up, here's the interface for querying the index that I am using > right now. It's meant to be able to retrieve from any kind of "backend", i.e. > in-memory, ClangdIndexDataStore, libIndexStore, et

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. As a follow-up, here's the interface for querying the index that I am using right now. It's meant to be able to retrieve from any kind of "backend", i.e. in-memory, ClangdIndexDataStore, libIndexStore, etc. I was able to implement "Open Workspace Symbol" (which is clo

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdIndex.h:24 +/// (re-)scoring symbols from different indexes. +class CombinedSymbolIndex : public SymbolIndex { +public: This seems a little premature to me - it's hard to know if this idea makes sense wit

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125962. ioeric added a comment. Diff on https://reviews.llvm.org/D40897 instead origin/master! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/Clang

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125960. ioeric added a comment. - Use IncludeNamespaceLevelDecls option; fix some broken tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/Clan