[PATCH] D47871: [clangd] Code completion: drop explicit injected names/operators, ignore Sema priority

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 7 03:50:41 PDT 2018


sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov.

Now we have most of Sema's code completion signals incorporated in Quality,
which will allow us to give consistent ranking to sema/index results.

Therefore we can/should stop using Sema priority as an explicit signal.
This fixes some issues like namespaces always having a terrible score.

The most important missing signals are:

- Really dumb/rarely useful completions like: SomeStruct().^SomeStruct SomeStruct().^operator= SomeStruct().~SomeStruct() We already filter out destructors, this patch adds injected names and operators to that list.
- type matching the expression context. Ilya has a plan to add this in a way that's compatible with indexes (design doc should be shared real soon now!)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47871

Files:
  clangd/CodeComplete.cpp
  clangd/Quality.cpp
  clangd/Quality.h
  test/clangd/completion.test
  test/clangd/protocol.test
  unittests/clangd/CodeCompleteTests.cpp
  unittests/clangd/QualityTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47871.150290.patch
Type: text/x-patch
Size: 8717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180607/d412cabc/attachment-0001.bin>


More information about the cfe-commits mailing list