[PATCH] D79500: [clangd] Refactor code completion signal's utility properties.

UTKARSH SAXENA via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 09:40:35 PDT 2020


usaxena95 created this revision.
usaxena95 added a reviewer: sammccall.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

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.

This only refactors Name and ContextWords which are essentially used to
compute whether the name contains a context word or not. If this looks
good then this will be done for other properties that are more of a
utility (used to compute other signals) than a signal themselves.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79500

Files:
  clang-tools-extra/clangd/CodeComplete.cpp
  clang-tools-extra/clangd/FindSymbols.cpp
  clang-tools-extra/clangd/Quality.cpp
  clang-tools-extra/clangd/Quality.h
  clang-tools-extra/clangd/XRefs.cpp
  clang-tools-extra/clangd/unittests/QualityTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79500.262400.patch
Type: text/x-patch
Size: 6916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200506/80a4d857/attachment-0001.bin>


More information about the cfe-commits mailing list