Re: [PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Eric Liu via cfe-commits
Sounds good. Thanks for the suggestion! On Wed, Jul 11, 2018 at 3:45 PM Sam McCall wrote: > > > On Wed, Jul 11, 2018, 15:18 Eric Liu via Phabricator < > revi...@reviews.llvm.org> wrote: > >> ioeric added a comment. >> >> In https://reviews.llvm.org/D49175#1158562, @sammccall wrote: >> >> > I lik

Re: [PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Sam McCall via cfe-commits
On Wed, Jul 11, 2018, 15:18 Eric Liu via Phabricator < revi...@reviews.llvm.org> wrote: > ioeric added a comment. > > In https://reviews.llvm.org/D49175#1158562, @sammccall wrote: > > > I like this idea, of course hard to know how it will affect all > practical cases. > > > > Is it easy to get hav

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336801: [clangd] Ignore sema code complete callback with recovery context. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49175#1158562, @sammccall wrote: > I like this idea, of course hard to know how it will affect all practical > cases. > > Is it easy to get have internal stats on how many wins/losses this has? This would fix bad completion results when sema

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. Thanks! That's a simple fix that makes things better overall! LGTM with a NIT about the comment in the test. Comment at: unittests/clangd/CodeCompleteTests.cpp:797 #if 0 + // In recorvery mode, "param_in_fo

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154979. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49175 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: uni

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. I like this idea, of course hard to know how it will affect all practical cases. Is it easy to get have internal stats on how many wins/losses this has? Comment at: cl

[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

2018-07-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay. Sema code complete in the recovery mode is generally useless. For many cases, sema first completes in recovery context and then recovers to more useful context,