[Lldb-commits] [lldb] r362437 - Silence 'warning C4305: 'initializing': truncation from 'double' to 'float'' with MSVC 19.16.27021.1 (VS2017 15.9.12)

Alexandre Ganea via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 3 11:46:31 PDT 2019


Author: aganea
Date: Mon Jun  3 11:46:30 2019
New Revision: 362437

URL: http://llvm.org/viewvc/llvm-project?rev=362437&view=rev
Log:
Silence 'warning C4305: 'initializing': truncation from 'double' to 'float'' with MSVC 19.16.27021.1 (VS2017 15.9.12)

Modified:
    lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp

Modified: lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp?rev=362437&r1=362436&r2=362437&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp Mon Jun  3 11:46:30 2019
@@ -31,7 +31,7 @@ struct Pod {
   bool a = true;
   bool b = false;
   char c = 'a';
-  float d = 1.1;
+  float d = 1.1f;
   int e = 2;
   long long f = 3;
   long g = 4;
@@ -443,7 +443,7 @@ TEST(RecordReplayTest, InstrumentedFoo)
 
   {
     int b = 200;
-    float c = 300.3;
+    float c = 300.3f;
     double e = 400.4;
 
     InstrumentedFoo foo(0);
@@ -471,7 +471,7 @@ TEST(RecordReplayTest, InstrumentedFooSa
   g_serializer.emplace(os);
 
   int b = 200;
-  float c = 300.3;
+  float c = 300.3f;
   double e = 400.4;
 
   InstrumentedFoo *foo = new InstrumentedFoo(0);
@@ -517,7 +517,7 @@ TEST(RecordReplayTest, InstrumentedBar)
 #endif
 
     int b = 200;
-    float c = 300.3;
+    float c = 300.3f;
     double e = 400.4;
 
     foo.A(100);
@@ -552,7 +552,7 @@ TEST(RecordReplayTest, InstrumentedBarRe
     InstrumentedFoo &foo = bar.GetInstrumentedFooRef();
 
     int b = 200;
-    float c = 300.3;
+    float c = 300.3f;
     double e = 400.4;
 
     foo.A(100);
@@ -587,7 +587,7 @@ TEST(RecordReplayTest, InstrumentedBarPt
     InstrumentedFoo &foo = *(bar.GetInstrumentedFooPtr());
 
     int b = 200;
-    float c = 300.3;
+    float c = 300.3f;
     double e = 400.4;
 
     foo.A(100);




More information about the lldb-commits mailing list