[PATCH] D52808: [cland] Dex: fix/simplify trigram generation

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 16:17:05 PDT 2018


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

1. Instead of a$$ for a short-query trigram, just use a
2. Generate more short-query trigrams, e.g. "AbcDefGhi" now yields "d" and "ag". This is effectively required by LSP, having "ag" not match but "agh" match will lead to glitches due to client-side filtering.
3. Drop leading-punctuation short-query trigrams. Nice idea, but current implementation is broken (competes with non-punctuation short query trigrams)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52808

Files:
  clangd/index/dex/Trigram.cpp
  clangd/index/dex/Trigram.h
  clangd/indexer/IndexerMain.cpp
  unittests/clangd/DexTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52808.168047.patch
Type: text/x-patch
Size: 13350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/7a1ba072/attachment-0001.bin>


More information about the cfe-commits mailing list