Fix MSVC "truncation from 'double' to 'float'" warning. NFCI.

llvm-svn: 344845
This commit is contained in:
Simon Pilgrim 2018-10-20 13:20:26 +00:00
parent ad28838111
commit 15ee23fc40
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ static float scopeBoost(ScopeDistance &Distance,
return 1;
auto D = Distance.distance(*SymbolScope);
if (D == FileDistance::Unreachable)
return 0.4;
return 0.4f;
return std::max(0.5, 2.0 * std::pow(0.6, D / 2.0));
}