[clangd] Run code completion on each token coverd by --check-lines
authorAdam Czachorowski <adamcz@google.com>
Wed, 2 Jun 2021 17:45:11 +0000 (19:45 +0200)
committerAdam Czachorowski <adamcz@google.com>
Fri, 4 Jun 2021 15:51:42 +0000 (17:51 +0200)
commiteba3ee04d450230f7ac1f88b1abd7b09c600c82d
treeb069e52fa1088293ed1a8d1bffa328f300a764dd
parent8a4d05ddb3ff25c53299ff440032547d68b36397
[clangd] Run code completion on each token coverd by --check-lines

In --check mode we do not run code completion because it is too slow,
especially on larger files. With the introducation of --check-lines we
can narrow down the scope and thus we can afford to do code completion.

We vlog() the top completion result, but that's not really the point.
The most value will come from being able to reproduce crashes that occur
during code completion and require preamble build or index (and thus are
more difficult to reproduce with -code-complete-at).

Differential Revision: https://reviews.llvm.org/D103538
clang-tools-extra/clangd/tool/Check.cpp
clang-tools-extra/clangd/tool/ClangdMain.cpp