[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 15:13:33 PDT 2019


xbolva00 added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:11430
+        SmallString<32> PrettyTargetValue;
+        TargetFloatValue.toString(PrettyTargetValue,
+          TargetPrecision);
----------------
Can you check my older patch + tests + discussion? 

I had to use other way to get this string..




================
Comment at: clang/test/Sema/implicit-float-conversion.c:13
+  
+  float ff = 222222222222L; // expected-warning {{implicit conversion from 'long' to 'float' changes value}}
+  
----------------
Can you show the whole warning message?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64666/new/

https://reviews.llvm.org/D64666





More information about the cfe-commits mailing list