[clangd] Refactor code completion signal's utility properties.
authorUtkarsh Saxena <usx@google.com>
Wed, 23 Sep 2020 12:37:07 +0000 (14:37 +0200)
committerUtkarsh Saxena <usx@google.com>
Wed, 23 Sep 2020 14:12:18 +0000 (16:12 +0200)
commit158af0d3d165c0382a6a291e81ffecf0b18ffe77
treed8164796383acb2e3ea720fb0215858413350126
parentdb40a74344292410aa3e08c42834423013c4f192
[clangd] Refactor code completion signal's utility properties.

Current implementation of heuristic-based scoring function also contains
computation of derived signals (e.g. whether name contains a word from
context, computing file distances, scope distances.)
This is an attempt to separate out the logic for computation of derived
signals from the scoring function.
This will allow us to have a clean API for scoring functions that will
take only concrete code completion signals as input.

Differential Revision: https://reviews.llvm.org/D88146
clang-tools-extra/clangd/Quality.cpp
clang-tools-extra/clangd/Quality.h