[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 27 07:47:46 PDT 2018


kbobyrev added inline comments.


================
Comment at: clangd/index/dex/Dex.cpp:171
   }
+  if (Req.AnyScope)
+    ScopeIterators.push_back(createBoost(createTrue(Symbols.size()), 0.2));
----------------
Probably also check `!ScopeIterators.empty()`: otherwise the latency might increase for queries without any scope/any scope known to `Dex`.


================
Comment at: unittests/clangd/DexTests.cpp:557
 
+TEST(DexTest, WildcardScope) {
+  auto I =
----------------
Probably also add test which ensures that wildcard symbols are downranked in the presence of `Req.Scopes` (ProximityPathsBoosting test is probably the closest in this sense)? Isn't too important, but nice-to-have in the presence of `ScopesProximity` plans (judging from the `FIXME` in `FuzzyFindRequest`).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52364





More information about the cfe-commits mailing list