[PATCH] D52016: [clangd] Don't create child AND and OR iterators with one posting list

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 13 01:17:45 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:148
+  if (TrigramIterators.size() > 1)
     TopLevelChildren.push_back(createAnd(move(TrigramIterators)));
+  else if (TrigramIterators.size() == 1)
----------------
Maybe special-case a single-iterator case in `createAnd` instead? Same with `createOr`.
Any cons to doing so?


https://reviews.llvm.org/D52016





More information about the cfe-commits mailing list