[PATCH] D34636: [clangd] LLVM-ify codebase

2017-06-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz created this revision. This patch introduces cosmetic changes while making ClangD code slightly more LLVM Coding Standards-compliant by - Convert names of struct fields in Protocol.h from `camelCase` to `CamelCase` - Enclose code in .cpp implementation files in appropriate namespaces

[PATCH] D47537: [clang-rename] Move clang-rename documentation to Clang repository

2018-05-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz created this revision. omtcyfz added reviewers: ioeric, klimek, arphaman. omtcyfz added projects: clang, clang-tools-extra. clang-rename was moved to the Clang repository in r306840, but documentation was left behind, which might be confusing. The Doxygen configuration file in

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-05-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 149138. omtcyfz retitled this revision from "[clang-rename] Move clang-rename documentation to Clang repository" to "[clang-tools-extra] Cleanup documentation routine". omtcyfz edited the summary of this revision. omtcyfz added a comment. Herald added a

[PATCH] D47471: [clangd] Minor cleanup

2018-05-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333411: [clangd] Minor cleanup (authored by omtcyfz, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: https://reviews.llvm.org/D47471?vs=148847=148887#toc

[PATCH] D47471: [clangd] Minor cleanup

2018-05-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz created this revision. omtcyfz added reviewers: ioeric, ilya-biryukov. omtcyfz added a project: clang-tools-extra. Herald added subscribers: jkorous, MaskRay. This patch silences few clang-tidy warnings, removes unwanted trailing whitespace and enforces coding guidelines. The

[PATCH] D47471: [clangd] Minor cleanup

2018-05-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz added a comment. Thank you, Eric! Repository: rL LLVM https://reviews.llvm.org/D47471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-06-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 150083. omtcyfz edited the summary of this revision. omtcyfz added a comment. Leave clang-rename docs in cfe-tools-extra repository, keep the second part of the patch. https://reviews.llvm.org/D47537 Files: clang-tools-extra/docs/Doxyfile

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-06-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz added a comment. @ioeric makes sense to me, I have reverted the first part of the patch while only leaving the second part of the cleanup, which might still be useful. https://reviews.llvm.org/D47537 ___ cfe-commits mailing list

[PATCH] D43671: [clangd] Address FIXME and fix comment

2018-02-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz marked an inline comment as done. omtcyfz added inline comments. Comment at: clangd/tool/ClangdMain.cpp:153 + if (RunSynchronously) { +if (WorkerThreadsCount != 0) { + llvm::errs() ioeric wrote: > `-j` is non-zero by default, and we shouldn't

[PATCH] D43671: [clangd] Address FIXME and fix comment

2018-02-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 135626. omtcyfz added a comment. Addressed review comment by actually checking whether -j option was actually passed to clangd. https://reviews.llvm.org/D43671 Files: clangd/Context.cpp clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp

[PATCH] D43671: [clangd] Address FIXME and fix comment

2018-02-23 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: cfe-commits, jkorous-apple, ilya-biryukov. - Address a FIXME by warning the user that both -run-synchronously and -j X are passed. - Fix a comment to suppress

[PATCH] D43671: [clangd] Address FIXME and fix comment

2018-02-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326051: [clangd] Address FIXME and fix comment (authored by omtcyfz, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D43671: [clangd] Address FIXME and fix comment

2018-02-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 135815. omtcyfz marked an inline comment as done. omtcyfz added a comment. Address Eric's nit: make warning message shorter so that it would fit into one line in order to omit braces for a single statement for compliance with the clang-tools-extra

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157447. kbobyrev added a comment. Rebase on top of https://reviews.llvm.org/rL337901 https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D49785: [clangd] Give an example for global-symbol-builder usage

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338015: [clangd] Give an example for symbol-builder usage (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE338017: [clangd] Proof-of-concept query iterators for Dex symbol index (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D49546?vs=157450=157451#toc Repository:

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157450. kbobyrev marked 10 inline comments as done. kbobyrev added a comment. Address post-lg round of comments. https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157439. kbobyrev added a comment. Typo: "Returns false if ..., false otherwise" ->"Returns false if ..., true otherwise". https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157438. kbobyrev marked 30 inline comments as done. kbobyrev added a comment. Addressed a round of comments: cleaned up the code, improved documentation and properly introduced such terms like Posting List and Query Tree. Tests are now more modular and

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160133. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address issues we have discussed with Eric. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Iterator.h

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160154. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address a round of comments. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Iterator.h clang-tools-extra/clangd/index/dex/Trigram.cpp

[PATCH] D50576: [clangd] Allow consumption of DocIDs without overhead

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. Herald added subscribers: arphaman, jkorous, MaskRay. This patch allows processing DocIDs from iterator using callback so that they are not stored in a vector if actual DocIDs are not needed. Such overhead is the

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160104. kbobyrev marked 12 inline comments as done. kbobyrev added a comment. Address most comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160146. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Store symbol qualities (so that it's not computed each time when requested which might be expensive). Use `operator[]` to construct the value for inverted index when key is not

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. This patch modifies `consume` function to allow retrieval of limited number of symbols. This is the "cheap"

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159908. kbobyrev marked 15 inline comments as done. kbobyrev added a comment. Address a round of comments. Also put `FIXME`s where appropriate for the future changes. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159658. kbobyrev added a comment. Minor code cleanup. This is now a fully functional symbol index. I have reflected my concerns and uncertainties in `FIXME`s, please indicate if you think there's something to improve in this patch. In general, I believe it

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. As discussed offline, I should update the patch to reflect changes accepted in https://reviews.llvm.org/D50517. https://reviews.llvm.org/D50337 ___ cfe-commits mailing list

[PATCH] D50689: [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. https://reviews.llvm.org/D50689 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ilya-biryukov, ioeric. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. This patch significantly improves performance of the YAML serializer by optimizing `YAML::isNumeric` function. This function is called

[PATCH] D50689: [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161013. kbobyrev marked an inline comment as done. kbobyrev added a comment. Improved wording to prevent confusion: no more `IDX` (which is the one pointed to by the iterator) and `IDN`; just mention that the element being pointed to is the one enclosed in

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161027. kbobyrev marked 2 inline comments as done. kbobyrev added a subscriber: lebedev.ri. kbobyrev added a comment. Herald added a subscriber: mgorny. Very good point by @lebedev.ri! I have added a very simple fuzzer for the parser. So far, there were no

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161017. kbobyrev added a comment. Sorry, the last diff was the old one. Should be correct now. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161033. kbobyrev added a comment. Use consistent `Regex` matchers naming: don't append "Matcher" at the end. https://reviews.llvm.org/D50839 Files: llvm/include/llvm/Support/YAMLTraits.h llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt

[PATCH] D50700: [clangd] Generate better incomplete bigrams for the Dex index

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324 + EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"})); + EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"})); ioeric wrote: > I'm

[PATCH] D50689: [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339877: [clangd] NFC: Improve Dex Iterators debugging traits (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D50689?vs=161013=161014#toc Repository: rCTE

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161202. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Address a round of comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161204. kbobyrev added a comment. Add couple tests, fix formatting issues, use `__builtin_trap()` instead of `assert` in fuzzer so that it's more transparent. Also, fuzzing this unreadable version for a couple of hours suggests that it is valid.

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161191. kbobyrev marked 4 inline comments as done. kbobyrev added a comment. Upload version which is IMO readable. https://reviews.llvm.org/D50839 Files: llvm/include/llvm/Support/YAMLTraits.h llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: llvm/include/llvm/Support/YAMLTraits.h:454 +inline bool isNumeric(StringRef S) { + if (S.empty()) +return false; zturner wrote: > What would happen if we re-wrote this entire function as: > > ``` > inline bool

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161192. kbobyrev added a comment. I tried to rewrite the loop, but IMO it looks even worse now. https://reviews.llvm.org/D50839 Files: llvm/include/llvm/Support/YAMLTraits.h llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt

[PATCH] D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340007: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE340007: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D50703?vs=160566=161196#toc

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. As discussed offline, incomplete trigrams (unigrams and bigrams generation) should be a blocker for this patch, because otherwise it isn't functional. Once incomplete trigrams are in, `MemIndex` tests can be reused for `DexIndex` to ensure stability.

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159463. kbobyrev added a comment. Don't resize retrieved symbols vector, simply let callback process at most `MaxCandidateCount` items. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. The patch is currently in preview-mode; I have to make few changes: - Improve testing infrastructure; one possible way would be to use exactly the same code `MemIndex` currently does as it is meant to be a drop-in replacement.

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, mgrang, jkorous, MaskRay, mgorny. This patch is a proof-of-concept Dex index implementation. It has several flaws, which don't allow

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159515. kbobyrev added a comment. Continue implementing Proof of Concept Dex-based static index replacement. This diff adds short query processing, the current solution does not utilize iterators framework (unlike the general queries) yet and is a subject

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339548: [clangd] Generate incomplete trigrams for the Dex index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160302. kbobyrev marked an inline comment as done. kbobyrev edited the summary of this revision. kbobyrev added a comment. Address the post-LGTM comment. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Iterator.h

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160071. kbobyrev added a comment. Complete the tests, finish the implementation. One thought about prefix match suggestion: we should either make it more explicit for the index (e.g. introduce `prefixMatch` and dispatch `fuzzyMatch` to prefix matching in

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160074. kbobyrev added a comment. @ilya-biryukov I have changed the approach to the one we discussed before. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Trigram.cpp clang-tools-extra/clangd/index/dex/Trigram.h

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. As discussed offline with @ilya-biryukov, the better approach would be to prefix match first symbols of each distinct identifier piece instead of prefix matching (just looking at the first letter of the identifier) the whole

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Oops, I thought I pushed "Plan Changes" for this one. https://reviews.llvm.org/D50500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. This patch is in preview mode and can be useful for the discussion. It's not functional yet, but this will be changed in the future. The upcoming changes would allow handling short queries introduced in

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. Herald added subscribers: arphaman, jkorous, MaskRay. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Trigram.cpp clang-tools-extra/clangd/index/dex/Trigram.h

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159959. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Fix the implementation and add test coverage. https://reviews.llvm.org/D50500 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160093. kbobyrev marked 8 inline comments as done. kbobyrev added a comment. Address issues we discussed with Eric. https://reviews.llvm.org/D50517 Files: clang-tools-extra/clangd/index/dex/Iterator.h clang-tools-extra/clangd/index/dex/Trigram.cpp

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Trigram.cpp:74 +// symbol of the identifier. +if (!FoundFirstSymbol) { + FoundFirstSymbol = true; ioeric wrote: > Could this be pulled out of the loop? I think what we

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D50517#1194990, @ioeric wrote: > In https://reviews.llvm.org/D50517#1194976, @kbobyrev wrote: > > > As discussed offline with @ilya-biryukov, the better approach would be to > > prefix match first symbols of each distinct identifier piece

[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160081. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address a round of comments. I have added few comments to get additional feedback before further changes are made. https://reviews.llvm.org/D50517 Files:

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160088. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D50500 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h clang-tools-extra/unittests/clangd/DexIndexTests.cpp Index:

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339426: [clangd] Allow consuming limited number of items (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50702: [clangd] NFC: Cleanup clangd help message

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339673: [clangd] NFC: Cleanup clangd help message (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D50702?vs=160557=160558#toc Repository: rCTE Clang Tools

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160576. kbobyrev added a comment. Don't separate the logic for "long" and "short" queries: https://reviews.llvm.org/D50517 (https://reviews.llvm.org/rCTE339548) introduced incomplete trigrams which can be used on for "short" queries, too.

[PATCH] D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. Workspace Symbol implementation was introduced in https://reviews.llvm.org/D44882 and should be complete now.

[PATCH] D50702: [clangd] NFC: Cleanup clangd help message

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. Add missed space, fix a typo. https://reviews.llvm.org/D50702 Files:

[PATCH] D50700: [clangd] Generate better incomplete bigrams for the Dex index

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. Currently, the query trigram generator would simply yield `u_p` trigram for the `u_p` query. This is not optimal,

[PATCH] D50700: [clangd] Generate better incomplete bigrams for the Dex index

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160555. kbobyrev added a comment. Treat leading underscores as additional signals and don't extract two heads in that case. https://reviews.llvm.org/D50700 Files: clang-tools-extra/clangd/index/dex/Trigram.cpp

[PATCH] D50707: NFC: Enforce good formatting across multiple clang-tools-extra files

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160605. kbobyrev added a comment. I have updated the patch so that it only affects comments, header guards and inserts few newlines. Actual source code is not affected so that `git blame` log could be less cryptic. https://reviews.llvm.org/D50707 Files:

[PATCH] D50707: NFC: Enforce good formatting across multiple clang-tools-extra files

2018-08-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339687: NFC: Enforce good formatting across multiple clang-tools-extra files (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D50707?vs=160605=160607#toc

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161487. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D50897 Files: clang-tools-extra/clangd/index/MemIndex.cpp clang-tools-extra/clangd/index/MemIndex.h clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161239. kbobyrev added a comment. Fix anonymous namespace beginning placement in Clangd driver. https://reviews.llvm.org/D50897 Files: clang-tools-extra/clangd/index/Index.h clang-tools-extra/clangd/index/MemIndex.cpp

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161252. kbobyrev marked 9 inline comments as done. kbobyrev added a comment. Address another round of comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. This patch adds hidden Clangd flag which replaces (currently) default `MemIndex` with `DexIndex` for the static

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161235. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address another round of comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161273. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Address all the comment, except the one about True iterators. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. I should create another patch with True iterator to address the last comment. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:97 +// Add OR iterator for scopes if the request contains scopes.

[PATCH] D51029: [clangd] Implement LIMIT iterator

2018-08-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. https://reviews.llvm.org/D51029 Files: clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D51029: [clangd] Implement LIMIT iterator

2018-08-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Since it's bundled with the BOOST iterator and doesn't make too much sense without it, I should probable rebase on top of https://reviews.llvm.org/D50970 and add it as the parent revision. https://reviews.llvm.org/D51029

[PATCH] D51029: [clangd] Implement LIMIT iterator

2018-08-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161677. kbobyrev added a comment. Add comprehensive tests, improve documentation. https://reviews.llvm.org/D51029 Files: clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161679. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Aww, the previous diff was the wrong one and didn't contain docs. The move of the code to the middle of Clangd driver was justified by the assumption that it might be better to

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340262: [clangd] Allow using experimental Dex index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161480. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Address post-LGTM comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340175: [clangd] DexIndex implementation prototype (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D51090: [clangd] Add index benchmarks

2018-08-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. This patch introduces index benchmarks on top of the proposed LLVM benchmark pull. The

[PATCH] D51090: [clangd] Add index benchmarks

2018-08-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. The current diff is rather messy and it is also blocked by the parent revision (https://reviews.llvm.org/D50894). It is likely to change if the parent CMake structure is changed. https://reviews.llvm.org/D51090

[PATCH] D51154: [clangd] Log memory usage of DexIndex and MemIndex

2018-08-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162184. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Slightly simplify the code. https://reviews.llvm.org/D51154 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/FileIndex.h

[PATCH] D51029: [clangd] Implement LIMIT iterator

2018-08-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162183. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Address a round comments from Sam. https://reviews.llvm.org/D51029 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h

[PATCH] D51154: [clangd] Log memory usage of DexIndex and MemIndex

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162334. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Address few concerns. https://reviews.llvm.org/D51154 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/FileIndex.h

[PATCH] D51154: [clangd] Log memory usage of DexIndex and MemIndex

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51154#1211376, @ioeric wrote: > Do we plan to expose an API in `ClangdServer` to allow C++ API users to track > index memory usages? I think we do, IIUC the conclusion of the offline discussion was that it might be useful for the

[PATCH] D51029: [clangd] Implement LIMIT iterator

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162341. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address a round of comments & simplify code. https://reviews.llvm.org/D51029 Files: clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D51154: [clangd] Log memory usage of DexIndex and MemIndex

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340601: [clangd] Log memory usage of DexIndex and MemIndex (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D51090: [clangd] Add index benchmarks

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162381. kbobyrev added a comment. Rebase on top of parent patch. https://reviews.llvm.org/D51090 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/benchmarks/CMakeLists.txt clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162808. kbobyrev marked an inline comment as done. kbobyrev added a comment. Complete two last paragraphs, address few comments. We haven't figured out whether we should suggest using this particular workflow at this point, but we're discussing the

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162842. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162840. kbobyrev added a comment. Run `clang-format`. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Dex is now mature enough to be used as the default static index. This patch performs the switch

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162865. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340828: [clangd] Switch to Dex by default for the static index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

  1   2   3   4   5   6   7   8   >