mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 19:36:05 +00:00
[clangd] Fix MSVC implicit capture build failure.
MSVC builds were failing because the constexpr wasn't couldn't be captured by the lamdba. Fix an implicit double to float truncation warning as well.
This commit is contained in:
parent
9e154f1aca
commit
888969f62a
@ -196,10 +196,10 @@ TEST(DecisionForestRankingModel, ReferencesAffectRanking) {
|
||||
|
||||
TEST(DecisionForestRankingModel, DecisionForestScorerCallbackTest) {
|
||||
clangd::CodeCompleteOptions Opts;
|
||||
constexpr float MagicNumber = 1234.5678;
|
||||
constexpr float MagicNumber = 1234.5678f;
|
||||
Opts.RankingModel = CodeCompleteOptions::DecisionForest;
|
||||
Opts.DecisionForestScorer = [](const SymbolQualitySignals &,
|
||||
const SymbolRelevanceSignals &, float Base) {
|
||||
Opts.DecisionForestScorer = [&](const SymbolQualitySignals &,
|
||||
const SymbolRelevanceSignals &, float Base) {
|
||||
DecisionForestScores Scores;
|
||||
Scores.Total = MagicNumber;
|
||||
Scores.ExcludingName = MagicNumber;
|
||||
|
Loading…
x
Reference in New Issue
Block a user