[PATCH] D96353: [clangd] Use ML Code completion ranking as default.

Utkarsh Saxena via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 01:37:45 PST 2021


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:651
+  auto Results =
+      completions("int main() { abs^ }", {func("absl"), func("absb")});
   EXPECT_THAT(Results.Completions,
----------------
hokein wrote:
> sorry, I didn't infer the motivation of this change func->ns from this patch, could you explain?
Sorry about not highlighting this.
The ML model doesn't rank the function before the namespace. I removed this and made both of these as functions to independently validate the effect of references.


================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:655
   Results = completions("int main() { abs^ }",
-                        {withReferences(10000, ns("absl")), func("absb")});
-  EXPECT_THAT(Results.Completions,
-              HasSubsequence(Named("absl"), Named("absb")));
+                        {withReferences(100, func("absl")), func("absb")});
 }
----------------
hokein wrote:
> looks like the Results here is not verified, as you remove the line below, is it intentional?
Oops. Thanks!.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96353/new/

https://reviews.llvm.org/D96353



More information about the cfe-commits mailing list