[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

UTKARSH SAXENA via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 03:18:58 PST 2020


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/CodeComplete.h:139
+  /// in the output.
+  std::function<void(const CodeCompletion &, const SymbolQualitySignals &,
+                     const SymbolRelevanceSignals &)> *RecordCCResult = nullptr;
----------------
sammccall wrote:
> I'd suggest including the final score in the signature rather than recompute it, just so the contract is really clear and simple (results yielded in arbitrary order, will be ranked by -score). Please spell this out.
Couldn't add it to the signature since inner classes cannot be forward declared.
Since `CodeCompletion` contains the `Score`, I have populated this field in the `CodeCompletion` (and also `CompletionTokenRange`) as done in `toCodeCompleteResult` to be consistent.

Also tested that the CodeCompletion is scored.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75603





More information about the cfe-commits mailing list