ioeric added inline comments.
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324
+ EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"}));
+ EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"}));
kbobyrev wrote:
> ioeric
kbobyrev added inline comments.
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324
+ EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"}));
+ EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"}));
ioeric wrote:
> I'm not
ioeric added inline comments.
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324
+ EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"}));
+ EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"}));
I'm not sure if this is c
kbobyrev updated this revision to Diff 160555.
kbobyrev added a comment.
Treat leading underscores as additional signals and don't extract two heads in
that case.
https://reviews.llvm.org/D50700
Files:
clang-tools-extra/clangd/index/dex/Trigram.cpp
clang-tools-extra/clangd/index/dex/Trigra
kbobyrev created this revision.
kbobyrev added reviewers: ioeric, ilya-biryukov.
kbobyrev added a project: clang-tools-extra.
Herald added subscribers: arphaman, jkorous, MaskRay.
Currently, the query trigram generator would simply yield `u_p` trigram for the
`u_p` query. This is not optimal, sin