[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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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] 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] 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] 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] 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
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] 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 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] 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] 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] 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] 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] 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] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a subscriber: hokein. ioeric added a comment. In D57509#1378978 , @ilya-biryukov wrote: > In D57509#1378943 , @ioeric wrote: > > > Yes, but a new option seems a bit of an overkill here. The text is >

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D57509#1378928 , @ilya-biryukov wrote: > Could this be made optional for VSCode? > As mentioned in the discussion before, I would personally prefer to turn it > off, even though I do acknowledge the need for this for some clie

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352764: [clangd] Append "(fix available)" to diagnostic message when fixes are present. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE L

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D57509#1378707 , @sammccall wrote: > In D57509#1378696 , @kadircet wrote: > > > Dropping by: Maybe add `(fix available)` as a prefix rather than suffix. > > Since long texts might end up

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 184510. ioeric marked 2 inline comments as done. ioeric added a comment. - address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57509/new/ https://reviews.llvm.org/D57509 Files: clangd/Diagnostics.cp

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 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. This would make diagnostic fixits more discoverable, especially for plugins like YCM. Repository: rCTE Clang Tools Extra https://revie

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

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D57442: [OpenGL] Fix test on PPC after r352540

2019-01-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352618: [OpenGL] Fix test on PPC after r352540 (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57

[PATCH] D57442: [OpenGL] Fix test on PPC after r352540

2019-01-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Herald added a subscriber: Anastasia. Specify -triple like test/SemaOpenCL/logical-ops.cl. Otherwise, this test fails on PPC. Repository: rC Clang https://reviews.llvm.org/D57442 Files: test/SemaOpenCL/format-strings-fixit.cl

[PATCH] D57223: [Tooling] Handle #pragma once header guard in include insertion.

2019-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352503: [Tooling] Handle #pragma once header guard in include insertion. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION ht

[PATCH] D57223: [Tooling] Handle #pragma once header guard in include insertion.

2019-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 184076. ioeric marked an inline comment as done. ioeric added a comment. - fix typo Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57223/new/ https://reviews.llvm.org/D57223 Files: lib/Tooling/Inclusions/HeaderIncludes.cpp

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

2019-01-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 183845. ioeric added a comment. - Rebase on origin/master Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 Files: clangd/ClangdUnit.cpp clangd/IncludeFixer.cpp clang

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352361: [clangd] Suggest adding missing includes for incomplete type diagnostics. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 183838. ioeric marked 12 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56903/new/ https://reviews.llvm.org/D56903 Files: clangd/CMakeL

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 183509. ioeric added a comment. - Rebase correctly Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56903/new/ https://reviews.llvm.org/D56903 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/Clang

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 183507. ioeric added a comment. - minor touch on documentation. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56903/new/ https://reviews.llvm.org/D56903 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Friendly ping. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56903/new/ https://reviews.llvm.org/D56903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D57223: [Tooling] Handle #pragma once header guard in include insertion.

2019-01-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D57223 Files: lib/Tooling/Inclusions/HeaderIncludes.cpp unittests/Tooling/HeaderIncludesTest.cpp Index: unittests/Tooling/HeaderInclu

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

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 182925. ioeric added a comment. - Rebase on D56903 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 Files: clangd/ClangdUnit.cpp clan

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 182922. 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/D56903/new/ https://reviews.llvm.org/D56903 Files: clangd/CMakeL

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D56903#1365487 , @sammccall wrote: > This looks pretty good! My main concern is latency (and variability of > latency) in practice. > Particularly: > > - we should avoid paying for fuzzyfind and fetching hundreds of results when

[PATCH] D57047: [clangd] Fix broken build after r351793.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. nvm, Simon beat me to it ;) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57047/new/ https://reviews.llvm.org/D57047 ___ cfe-commits mailing list

[PATCH] D57047: [clangd] Fix broken build after r351793.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D57047#1366265 , @kadircet wrote: > LGTM, but hokein might know better whether to push the default options or the > one in ClangdServerOpts I'm going to land this now to unbreak build. Feel free to comment or do further refac

[PATCH] D57042: [clangd] NFC: reduce log noise from Diagnostics.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351813: [clangd] NFC: reduce log noise from Diagnostics. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D57047: [clangd] Fix broken build after r351793.

2019-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: kadircet, sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D57047 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp ===

[PATCH] D57042: [clangd] NFC: reduce log noise from Diagnostics.

2019-01-22 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/D57042 Files: clangd/Diagnostics.cpp Index: clangd/Diagnostics.cpp

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

2019-01-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 182800. ioeric added a comment. - Rebase on D56903 . Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 Files: clangd/ClangdUnit.cpp cla

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

2019-01-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 182799. ioeric added a comment. - revert unintended change Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clan

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

2019-01-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. This adds include-fixer feature into clangd based on D56903 . Clangd now captures diagnostics caused by typos and attach include insertion fixes to potentially fix the typo. Repository: rCTE Cla

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 182796. ioeric added a comment. - add comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56903/new/ https://reviews.llvm.org/D56903 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUni

[PATCH] D56903: [clangd] Suggest adding missing includes for incomplete type diagnostics.

2019-01-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny. This enables clangd to intercept compiler diagnostics and attach fixes (e.g. by querying index). This patch ad

[PATCH] D56841: [clangd] Filter out plugin related flags.

2019-01-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdUnit.cpp:429 + const auto &CommandLine = Inputs.CompileCommand.CommandLine; + for (size_t I = 0, E = CommandLine.size(); I != E; I++) { +// According to https://clang.llvm.org/docs/ClangPlugins.html ily

[PATCH] D56841: [clangd] Filter out plugin related flags.

2019-01-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdUnit.cpp:429 + const auto &CommandLine = Inputs.CompileCommand.CommandLine; + for (size_t I = 0, E = CommandLine.size(); I != E; I++) { +// According to https://clang.llvm.org/docs/ClangPlugins.html Thi

[PATCH] D56830: Prototype for include-fixer workflow in clangd. [NOT FOR REVIEW]

2019-01-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56830 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Dia

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

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349496: [clangd] BackgroundIndex rebuilds symbol index periodically. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https:

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

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 178676. ioeric marked an inline comment as done. ioeric added a comment. - Add comment about double-check of ShouldStop. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55770/new/ https://reviews.llvm.org/D55770 F

[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 inline comments. Comment at: clangd/index/Background.h:112 + const size_t BuildIndexPeriodMs; + std::atomic SymbolsUpdatedSinceLastIndex; + std::mutex IndexMu; kadircet wrote: > We already have a mutex and

[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

[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] 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] 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
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] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347983: [clangd] Penalize destructor and overloaded operators in code completion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D55061?vs=176075&id=176076#toc

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.h:74 Keyword, +Operator, } Category = Unknown; hokein wrote: > Maybe name it `OverloadedOperator` to avoid confusion with other > non-overloaded operators like `?:` Ternary operator is not a sy

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 176075. ioeric marked an inline comment as done. ioeric added a comment. - Rename test name. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55061/new/ https://reviews.llvm.org/D55061 Files: clangd/Quality.cpp

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347982: [clangd] Drop injected class name when class scope is not explicitly specified. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE L

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:419 +TEST(CompletionTest, SkipInjectedWhenUnqualified) { + EXPECT_THAT(completions("struct X { void f() { X^ }};").Completions, kadircet w

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. James, do you have commit access to llvm? If not, I'm happy to land the patch for you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55052/new/ https://reviews.llvm.org/D55052 ___ cfe-commits mailing list cfe-commit

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. E.g. allow injected "A::A" in `using A::A^` but not in "A^". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55065 Files: clangd/

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55061 Files: clangd/Quality.cpp clangd/Quality.h unittests/clangd/Quali

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-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. In D55052#1312766 , @hokein wrote: > In D55052#1312760 , @ilya-biryukov > wrote: > > > +1 to the change, this

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the patch James! Adding folks who are currently using vscode+clangd to get more opinions. Comment at: clangd/clients/clangd-vscode/src/extension.ts:59 +// Avoid lots of junk in output +revealOutputChannelOn: vscodelc.RevealOut

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347739: [clangd] Canonicalize file path in URIForFile. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54845?vs=175466&id=175642#toc Repository: rCTE Clang T

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D54845#1309589 , @sammccall wrote: > Mostly just places that should be updated HintPath -> TUPath. Changing the > whole codebase doesn't seem important, but in places that are touched... As chatted offline, `URIForFile` is clo

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! PTAL Comment at: clangd/Protocol.h:74 + /// \p AbsPath is resolved to a canonical path corresponding to its URI. + URIForFile(llvm::StringRef AbsPath, llvm::StringRef HintPath = ""); + sammccall wrote: > sammccal

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 175466. ioeric marked 7 inline comments as done. ioeric added a comment. address comments and rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54845/new/ https://reviews.llvm.org/D54845 Files: clangd/Clang

[PATCH] D54894: [clangd] Enable auto-index behind a flag.

2018-11-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. lgtm (will let @kadircet stamp ) Comment at: test/clangd/background-index.test:19 +# Test the index is read from disk: delete code and restart clangd. +# This test currently fails as we don't read the index yet. +# RUN: rm %t/foo.cpp May

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:386 const Symbol *BasicSymbol = Symbols.find(*ID); - if (!BasicSymbol) // Regardless of role, ND is the canonical declaration. -BasicSymbol = addDeclaration(*ND, std::move(*ID)); - else if (isPref

[PATCH] D54851: [clangd] Tune down scope boost for global scope

2018-11-26 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347548: [clangd] Tune down scope boost for global scope (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54851?vs=175106&id=175226#toc Repository: rCTE Clang

[PATCH] D54851: [clangd] Tune down scope boost for global scope

2018-11-23 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. This improves cross-namespace completions and has ignorable impact on other completion types. Metrics === OVERALL (excl. CROSS_NAME

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-23 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. File paths in URIForFile can come from index or local AST. Path from index goes through URI transformation and the final path is resolved b

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347467: [clangd] Cleanup: stop passing around list of supported URI schemes. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54800?vs=175048&id=175052#toc Repo

[PATCH] D54833: [clangd] Cleanup: use index file instead of header in workspace symbols lit test.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347466: [clangd] Cleanup: use index file instead of header in workspace symbols lit… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54833?vs=175047&id=175051#t

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 175048. ioeric marked 3 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54800 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h c

[PATCH] D54833: [clangd] Cleanup: use index file instead of header in workspace symbols lit test.

2018-11-22 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. The full path of the input header depends on the execution environment and may result in different behavior (e.g. when different URI scheme

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 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 Could you run clang-format on the changed lines? Comment at: clangd/clients/clangd-vscode/package.json:81 +"command": "clangd-vscode.switchheadersource"

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 174929. ioeric added a comment. - remove unused include Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54800 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/URI.cpp clangd/URI.h clangd/index

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-21 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. Instead of passing around a list of supported URI schemes in clangd, we expose an interface to convert a path to URI using any compatible s

<    1   2   3   4   5   6   7   8   9   10   >