[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 156443. omtcyfz marked 35 inline comments as done. omtcyfz added a comment. Addressed most comments (aside from reusing fuzzy matching segmentation routine and making data + hash a separate structure). Since I already submitted my next revision

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz added inline comments. Comment at: clang-tools-extra/clangd/index/noctem/SearchAtom.h:53 + SearchAtom(llvm::StringRef Data, Namespace Type = Namespace::Trigram) + : Data(Data), Hash(std::hash{}(Data)), Type(Type) {} + ioeric wrote: > ioeric wrote:

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (just .h files. +1 to eric's comments except where noted) Comment at: clang-tools-extra/clangd/index/noctem/SearchToken.h:2 +//===--- SearchToken.h- Symbol Search primitive --*- C++ +//-*-===// +// nit: something went

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/noctem/SearchToken.cpp:38 + +// FIXME(kbobyrev): Deal with short symbol symbol names. A viable approach would +// be generating unigrams and bigrams here, too. This would prevent symbol index

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a subscriber: arphaman. In https://reviews.llvm.org/D49417#1166538, @omtcyfz wrote: > Addressed all comments submitted by Eric. > > As discussed internally, I should also exercise my naming skills and come up > with a better for the symbol index to

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 156073. omtcyfz marked 11 inline comments as done. omtcyfz added a comment. Addressed all comments by Eric. As discussed internally, I should also exercise my naming skills and come up with a better for the symbol index to substitute "Noctem" which doesn't

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Some high-level comments before jumping into details. Comment at: clang-tools-extra/clangd/index/noctem/SearchAtom.cpp:23 + +// FIXME(kbobyrev): Deal with short symbol symbol names. +std::vector generateSearchAtoms(StringRef SymbolName) {

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155830. omtcyfz added a comment. Fix unittest file name in header. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155827. omtcyfz added a comment. Wipe redundant FIXMEs. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155828. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h clang-tools-extra/unittests/clangd/CMakeLists.txt

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155824. omtcyfz added a comment. Fix documentation indentation in SearchAtom description. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz created this revision. omtcyfz added a reviewer: ioeric. omtcyfz added a project: clang-tools-extra. Herald added subscribers: jkorous, MaskRay, mgorny. This patch introduces trigram generation algorithm for the symbol index proposed in a recent design document. RFC in the mailing list: