[clang-tools-extra] r344845 - Fix MSVC "truncation from 'double' to 'float'" warning. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 20 06:20:26 PDT 2018


Author: rksimon
Date: Sat Oct 20 06:20:26 2018
New Revision: 344845

URL: http://llvm.org/viewvc/llvm-project?rev=344845&view=rev
Log:
Fix MSVC "truncation from 'double' to 'float'" warning. NFCI.

Modified:
    clang-tools-extra/trunk/clangd/Quality.cpp

Modified: clang-tools-extra/trunk/clangd/Quality.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Quality.cpp?rev=344845&r1=344844&r2=344845&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Quality.cpp (original)
+++ clang-tools-extra/trunk/clangd/Quality.cpp Sat Oct 20 06:20:26 2018
@@ -323,7 +323,7 @@ static float scopeBoost(ScopeDistance &D
     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));
 }
 




More information about the cfe-commits mailing list