[all-commits] [llvm/llvm-project] bad8e5: Fix DecisionForestBenchmark.cpp compile errors

Utkarsh Saxena via All-commits all-commits at lists.llvm.org
Tue Mar 2 01:28:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bad8e577f9c75c8b84efca79980781599e8e9f86
      https://github.com/llvm/llvm-project/commit/bad8e577f9c75c8b84efca79980781599e8e9f86
  Author: Utkarsh Saxena <usx at google.com>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp

  Log Message:
  -----------
  Fix DecisionForestBenchmark.cpp compile errors

clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp fails to compile since `"CompletionModel.h"` is auto-generated from clang-tools-extra/clangd/quality/model/features.json, which was changed in https://reviews.llvm.org/D94697 to remove `setFilterLength` and `setIsForbidden`, rename `setFileProximityDistance` and `setSymbolScopeDistance`, and add `setNumNameInContext` and `setFractionNameInContext`.  This patch removes calls to the two removed functions, updates calls to the two renamed functions, and adds calls to the two new functions. (`20` is an arbitrary choice for the `setNumNameInContext` argument.) It also changes the `FlipCoin` argument from float to double to silence lossy conversion warnings.

Note: I don't use this tool but encountered the build errors and took a shot at fixing them. Please holler if there's another recommended solution. Thanks!

Reviewed By: usaxena95

Differential Revision: https://reviews.llvm.org/D97620




More information about the All-commits mailing list