[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the reviews! Comment at: clangd/ClangdUnit.cpp:155 +auto S = FS->status(Path); +if (S) + cacheStatus(*S); sammccall wrote: > why are you only caching success? I had a comment in `openFileForRead`: ``` // Only

[PATCH] D52503: [clangd] More precise index memory usage estimate

2018-09-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto &P : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto &TokenToPostingList : InvertedIndex) +Bytes += TokenTo

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto &P : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto &TokenToPostingList : InvertedIndex) +Bytes += TokenTo

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167124. ioeric marked 7 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdUnit.cpp:339 +llvm::ErrorOr status(const Twine &Path) override { + auto I = StatCache.find(Path.str()); + return (I != StatCache.end()) ? I->getValue() : FS->status(Path); ilya-biryukov wrote: >

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167135. ioeric marked 14 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52364 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h clangd

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/Index.h:430 /// - /// The global scope is "", a top level scope is "foo::", etc. + /// The global scope is "", a top level scope is "foo::", etc. "*" is + /// wildcard. sammccall wrote: > I'm not a big

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:97 /// ChildN is N-th iterator child. Raw iterators over PostingList are - /// represented as "[ID1, ID2, ..., {IDN}, ... END]" where IDN is N-th - /// PostingList entry and the element w

[PATCH] D52544: Improve diagnostics range reporting.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clangd/Diagnostics.cpp:55 // Accept the first range that contains the location. + llvm::Optional PossibleRange; for (const auto &CR : D.getRanges()) {

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. This looks like a great improvement. The design looks reasonable to me. The cache states were a bit confusing at first, but I think more documentation when polishing the prototype could help. I'd be really interested in seeing some profiles before/after this optimization

[PATCH] D52611: [clangd] Add more tracing to index queries. NFC

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52611 Files: clangd/index/MemIndex.cpp clangd/index/Merge.cpp clangd

[PATCH] D52617: [clangd] Make stable_partition on include candidates less slow. NFC

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. stable_partition on objects is slow (due to copies). Do it on pointers instead. Repository: rCTE Clang Tools Extra https://reviews.llv

[PATCH] D52611: [clangd] Add more tracing to index queries. NFC

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167336. ioeric marked 2 inline comments as done. ioeric added a comment. - address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52611 Files: clangd/index/MemIndex.cpp clangd/index/Merge.cpp clangd/index/dex/Dex.cpp Index:

[PATCH] D52611: [clangd] Add more tracing to index queries. NFC

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343247: [clangd] Add more tracing to index queries. NFC (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52611 Files: clang

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167356. ioeric marked 2 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52364 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h clangd/

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343248: [clangd] Initial supoprt for cross-namespace global code completion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D52364?vs=167356&id=167357#toc Repo

[PATCH] D52617: [clangd] Make stable_partition on include candidates less slow. NFC

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167361. ioeric marked 3 inline comments as done. ioeric added a comment. - simplify the code. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52617 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167370. ioeric marked 2 inline comments as done. ioeric added a comment. - Address review comments - address review comments - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clan

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/FS.cpp:29 +PreambleFileStatusCache::lookup(llvm::StringRef File) const { + auto I = StatCache.find(File); + if (I != StatCache.end()) sammccall wrote: > ioeric wrote: > > sammccall wrote: > > > lock > > After a s

[PATCH] D52647: [CodeComplete] Re-fix accessibilty of protected members from base class.

2018-09-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. The initial fix (r337453) had bug and was partially reverted (r338255). This simplies the original fix by explicitly passing the naming class to the completion consumer. Repository: rC

[PATCH] D52225: [clang] Implement Override Suggestions in Sema.

2018-10-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:1603 + const CodeCompletionContext &CCContext, + CodeCompletionBuilder &Builder, Sema &S) { + const auto *CR = llvm::dyn_cast(S.CurContext); --

[PATCH] D52225: [clang] Implement Override Suggestions in Sema.

2018-10-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Comment at: lib/Sema/SemaCodeComplete.cpp:1639 +llvm::raw_string_ostream OS(OverrideSignature); +CodeCompletionResult CCR(Method, 0); +PrintingPoli

[PATCH] D52226: [clangd] Remove override result handling logic from clangd

2018-10-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D52647: [CodeComplete] Re-fix accessibilty of protected members from base class.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Herald added a subscriber: arphaman. ping Repository: rC Clang https://reviews.llvm.org/D52647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52715: [clangd] Dex iterator printer shows query structure, not iterator state.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: unittests/clangd/DexTests.cpp:239 + auto Tree = createLimit(createAnd(move(I1), move(I2)), 10); + EXPECT_EQ(llvm::to_string(*Tree), "(LIMIT 10 (& [1 3 5] T=

[PATCH] D52711: [clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clangd/index/dex/Iterator.h:131 +struct Corpus { + DocID Size; + Maybe make this a constant and initialize it via a constructor? Repositor

[PATCH] D52647: [CodeComplete] Re-fix accessibilty of protected members from base class.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343575: [CodeComplete] Re-fix accessibilty of protected members from base class. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.o

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167913. ioeric added a comment. - add comment for StatCache in PreambleData Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167914. ioeric added a comment. - Rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/CodeComplete.cpp clangd/CodeCompl

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343576: [clangd] Cache FS stat() calls when building preamble. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D52419?vs=167914&id=167915#toc Repository: rCTE

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-10-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343576: [clangd] Cache FS stat() calls when building preamble. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52419 Files:

[PATCH] D52808: [cland] Dex: fix/simplify trigram generation

2018-10-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > Generate more short-query trigrams, e.g. "AbcDefGhi" now yields "d" and "ag". I am concerned about the impact on the size of posting lists (we can measure) and retrieval quality by adding more incomplete trigrams. > This is effectively required by LSP, having "ag" not

[PATCH] D52753: [tooling] Create executor by name

2018-10-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > This is useful in the case where the calling tool always wants to use a > particular non-default implementation (e.g. the tool should always be run > with the all-TUs executor) Any reason not to use the constructor of `AllTUsToolExecutor` directly? There is one that t

[PATCH] D52808: [cland] Dex: fix/simplify trigram generation

2018-10-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. > The problem is LSP clients are free to assume that the result list is > complete (unless marked as incomplete) and therefore will never retrieve the > better symbols. Good point. Thanks for

[PATCH] D52885: [clangd] Remove one-segment-skipping from Dex trigrams.

2018-10-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/index/dex/Trigram.cpp:44 // * Next Head - front character of the next segment // * Skip-1-Next Head - front character of the skip-1-next segment

[PATCH] D52937: [clangd] Add clangd.serverInfo command to inspect server state.

2018-10-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. How will this command be triggered? What's the advantage comparing to `vlog`ing? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.h:78 + /// Remove all index data associated with the file \p Path. + void removeFile(PathRef Path); + should we use this somewhere? E.g. when file is closed in ClangdServer? Repository: rCTE C

[PATCH] D52991: [clangd] Avoid cache main file status in preamble.

2018-10-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Main file can certainly change when reusing preamble. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52991 Files: cla

[PATCH] D52991: [clangd] Avoid cache main file status in preamble.

2018-10-09 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344024: [clangd] Avoid cache main file status in preamble. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52991 Files: cl

[PATCH] D57508: [clangd] Enable include insertion for dynamic index

2019-02-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Herald added a project: clang. Comment at: clangd/ClangdUnit.cpp:100 + : File(File), ParsedCallback(ParsedCallback), +IWYUHandler(collectIWYUHeaderMaps(&CanonIncludes)) {} Does this have to own the `IWYUHandler`? Could

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-02-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 185031. ioeric marked 13 inline comments as done. ioeric added a comment. Herald added a project: clang. - address review comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.or

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-02-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.cpp:209 + std::vector Scopes; + if (Typo.SS) { +Scopes.push_back(*Typo.SS); sammccall wrote: > why do we do this here rather than compute the scopes/name already in > CorrectTypo()? > > Passing

[PATCH] D57508: [clangd] Enable include insertion for dynamic index

2019-02-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm. Note that this will enable include insertions for everyone (even without index switched on). Not sure if we should provide options. Comment at: clangd/ClangdServer.cp

[PATCH] D57739: [clangd] Format tweak's replacements.

2019-02-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdServer.cpp:366 + auto Style = getFormatStyle(Code, File); + if (!Style) +return; hokein wrote: > not sure the err-handling strategy here -- maybe if this is failed, we still > apply replacements (witho

[PATCH] D57815: [clangd] Add type boost to fuzzy find in Dex.

2019-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. No noticeable impact on code completions overall except some improvement on cross-namespace completion. Repo

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 185546. ioeric marked 15 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 Files: clangd/Clangd

[PATCH] D57815: [clangd] Add type boost to fuzzy find in Dex.

2019-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 185554. ioeric marked 4 inline comments as done. ioeric added a comment. - address comments plus some refactoring. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57815/new/ https://reviews.llvm.org/D57815 Files:

[PATCH] D57815: [clangd] Add type boost to fuzzy find in Dex.

2019-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 18. ioeric added a comment. - revert unintended change. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57815/new/ https://reviews.llvm.org/D57815 Files: clangd/CodeComplete.cpp clangd/index/Index.cpp cl

[PATCH] D57815: [clangd] Add type boost to fuzzy find in Dex.

2019-02-06 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE353310: [clangd] Add type boost to fuzzy find in Dex. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D57815?vs=18&id=185556#toc Repository: rCTE Clang To

[PATCH] D57878: [clangd] Use Dex for dynamic index by default.

2019-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Memory usage for a sample TU: Without Dex: 17.9M WithDex: 24.4M The memory increase is considerable but seems tolerable. Repository:

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 185718. ioeric marked 2 inline comments as done. ioeric added a comment. - Merge remote-tracking branch 'origin/master' into typo - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-02-07 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353380: [clangd] Suggest adding missing includes for typos (like include-fixer). (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D57878: [clangd] Use Dex for dynamic index by default.

2019-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 185762. ioeric added a comment. - Keep the option for now. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57878/new/ https://reviews.llvm.org/D57878 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/Clangd

[PATCH] D57878: [clangd] Use Dex for dynamic index by default.

2019-02-07 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE353413: [clangd] Use Dex for dynamic index by default. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D57878?vs=185762&id=185763#toc Repository: rCTE Clang T

[PATCH] D57944: [clangd] Fix an assertion in TypoCorrection.

2019-02-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. https://github.com/clangd/clangd/issues/7 Repository: rCTE Clang Tools Extra https://reviews.llv

[PATCH] D57944: [clangd] Fix an assertion in TypoCorrection.

2019-02-08 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked an inline comment as done. Closed by commit rL353514: [clangd] Fix an assertion in TypoCorrection. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Ch

[PATCH] D58037: [clangd] Prefer location from codegen files when merging symbols.

2019-02-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. For example, if an index symbol has location in a .proto file and an AST symbol has location in a generated

[PATCH] D58037: [clangd] Prefer location from codegen files when merging symbols.

2019-02-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 186245. ioeric marked 3 inline comments as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58037/new/ https://reviews.llvm.org/D58037 Files: clangd/XRefs.

[PATCH] D58037: [clangd] Prefer location from codegen files when merging symbols.

2019-02-11 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE353708: [clangd] Prefer location from codegen files when merging symbols. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D58037?vs=186245&id=186251#toc Reposit

[PATCH] D58135: [clangd] Handle a few more diag kinds in include fixer.

2019-02-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D58135 Files: clangd/IncludeFixer.cpp un

[PATCH] D58135: [clangd] Handle a few more diag kinds in include fixer.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353926: [clangd] Handle a few more diag kinds in include fixer. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES S

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. ioeric updated this revision to Diff 186674. ioeric added a comment. ioeric edited the summary of

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 186674. ioeric added a comment. - Remove unintended change. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/IncludeFixer.cpp unittests/clangd/Diagnostic

[PATCH] D58239: [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

2019-02-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Multiple diagnostics can be caused by the same unresolved name or incomplete type, especially if

[PATCH] D58239: [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187205. ioeric marked 4 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58239/new/ https://reviews.llvm.org/D58239 Files: clangd/Include

[PATCH] D58239: [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.h:85 + // name or incomplete type in one parse, especially when code is + // copy-and-pasted without #includes. As fixes are purely dependent on index + // requests and index results at this point, we can cache fixe

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.cpp:235 + std::string Spelling = (Code.substr(B, E - B) + "::").str(); + if (llvm::StringRef(SpecifiedNS).endswith(Spelling)) +SpecifiedScope = SpecifiedNS; sammccall wrot

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187222. ioeric marked 9 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/Include

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Looks great! Thanks for doing this. Could you also check in the tool that is used to generate the mapping? We need a way to update the mapping when cppreference is updated. Comment at: clangd/index/CanonicalIncludes.cpp:123 static const std::vecto

[PATCH] D58239: [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187226. ioeric marked 2 inline comments as done. ioeric added a comment. - pulled cached index queries into functions Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58239/new/ https://reviews.llvm.org/D58239 File

[PATCH] D58239: [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354268: [clangd] Cache include fixes for diagnostics caused by the same unresolved name… (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Reposit

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.cpp:191 +//~~ +llvm::Optional qualifiedByUnresolved(llvm::StringRef Code, + size_t Offset) { sammccall wrote: > this isn't wrong per se

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187343. ioeric marked 16 inline comments as done. ioeric added a comment. - address review comment Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/Include

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187359. ioeric added a comment. - minor cleanup Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/IncludeFixer.cpp unittests/clangd/DiagnosticsTests.cpp

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354330: [clangd] Handle unresolved scope specifier when fixing includes. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D58446: [CodeComplete] Collect visited contexts when scope specifier is invalid.

2019-02-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. This will allow completion consumers to guess the specified scope by putting together scopes in the context with the specified scope (e.g. when the

[PATCH] D58448: [clangd] Improve global code completion when scope specifier is unresolved.

2019-02-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, sammccall. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Suppose `clangd::` is unresolved in the following example. Currently, we simply use "clangd::" as

[PATCH] D58446: [CodeComplete] Collect visited contexts when scope specifier is invalid.

2019-02-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187756. ioeric added a comment. - Cleanup unit tests (forgot to run... sorry) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58446/new/ https://reviews.llvm.org/D58446 Files: lib/Sema/SemaCodeComplete.cpp unittests/Sema/Co

[PATCH] D58446: [CodeComplete] Collect visited contexts when scope specifier is invalid.

2019-02-21 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354570: [CodeComplete] Collect visited contexts when scope specifier is invalid. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Thanks for the changes! Lgtm with a few nits. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRules.h:33 +/// +/// - requiredSelection: The refactoring functi

[PATCH] D37210: [refactor] add a refactoring action rule that returns symbol occurrences

2017-08-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm Repository: rL LLVM https://reviews.llvm.org/D37210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D37291: [refactor] Use a RefactoringResultConsumer instead of tagged refactoring rule classes

2017-08-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringResultConsumer.h:39 + /// Handles the source replacements that are produced by a refactoring action. + virtual void handle(AtomicChanges SourceReplacements) = 0; +}; I think

[PATCH] D37291: [refactor] Use a RefactoringResultConsumer instead of tagged refactoring rule classes

2017-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringResultConsumer.h:39 + /// Handles the source replacements that are produced by a refactoring action. + virtual void handle(AtomicChanges SourceReplacements) = 0; +}; arphama

[PATCH] D37291: [refactor] Use a RefactoringResultConsumer instead of tagged refactoring rule classes

2017-08-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. LGTM. @klimek Manuel, would you like to take a look? This addresses your comment https://reviews.llvm.org/D36075#854075 Comment at: include/clang/Tooling/Refactoring/Refact

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringAction.h:20 + +class RefactoringAction { +public: Please add documentation for the class. I appreciate your RFC that explains all these concepts; it would be nice if you cou

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRules.h:45 std::unique_ptr createRefactoringRule(Expected (*RefactoringFunction)( typename RequirementTypes::OutputType...), Can we get rid o

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:43 +class LocalRename : public RefactoringAction { + StringRef getCommand() const override { return "local-rename"; } + Shouldn't these be public? Comm

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: tools/clang-refactor/ClangRefactor.cpp:103 +IsSelectionParsed = true; +// FIXME: Support true selection ranges. +StringRef Value = *Selection; arphaman wrote: > ioeric wrote: > > Is the test selection temporar

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: tools/clang-refactor/ClangRefactor.cpp:29 +using namespace tooling; +using namespace clang_refactor; +namespace cl = llvm::cl; Sorry for haven't noticed this earlier, but I think `clang::refactor` sounds like a better na

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. I think this is ready to go. @klimek Manuel, are all your concerns addressed? Comment at: tools/clang-refactor/ClangRefactor.cpp:62 + /// \returns true if an error occurred

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Please wait for Manuel's reply before landing the patch ;-) Repository: rL LLVM https://reviews.llvm.org/D36574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D37618: Use CommonOptionsParser in clang-refactor

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm Repository: rL LLVM https://reviews.llvm.org/D37618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Feel free to land the patch now if comments are addressed. Repository: rL LLVM https://reviews.llvm.org/D36574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D37681: [refactor] Simplify the interface and remove some template magic

2017-09-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. This is very nice! Thanks! Looks good to me; I'll let Manuel stamp the patch for you. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRules.h:56 + virtual Expected + createSourceReplacements(RefactoringRuleContext &Context) = 0; + -

[PATCH] D37856: [refactor] add support for refactoring options

2017-09-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Sorry for the delay (most of us are OOO this week). Comment at: include/clang/Tooling/Refactoring/RefactoringActionRule.h:48 + + virtual void visitRefactoringOptions(RefactoringOptionConsumer &Consumer) = 0; }; Please document the beh

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, ilya-biryukov, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Code completion will suggest symbols from any scope (incl. inaccessible scopes) when there's no qualifier explicitly specified. As we are assign

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: clangd/tool/ClangdMain.cpp:144 "can insert scope qualifiers."), -cl::init(false), cl::Hidden); +cl::init(true)); kadircet wrote: > why not keep it hidden ? We hi

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349049: [clangd] Enable cross-namespace completions by default in clangd (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION ht

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, kadircet. Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay. Currently, background index rebuilds symbol index on every indexed file, which can be inefficient. This patch makes it only rebuild symbol index p

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added a comment. In D55770#1333271 , @dblaikie wrote: > (from the peanut gallery): Usually what I'd expect here is "reindexing will > occur X milliseconds after a write, covering anything written up until th

<    6   7   8   9   10   11   12   13   14   15   >