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

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 11 06:18:55 PDT 2018


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 could recover to the normal mode (e.g. completion in macros like EXPECT_THAT, expressions in if statements). From the code completion metrics I collected from existing code, the number of completions where no result was found dropped by 30%. The loss seems to be we will get no result in recovery mode rather than bad results (e.g. in excluded preprocessor branches).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49175





More information about the cfe-commits mailing list