gchatelet marked 2 inline comments as done.
gchatelet added inline comments.


================
Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions.cpp:42-44
   i += 2.0;
-  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: narrowing conversion from 
'double' to 'int' [cppcoreguidelines-narrowing-conversions]
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: narrowing conversion from 
constant 'double' to 'int' [cppcoreguidelines-narrowing-conversions]
   i += 2.0f;
----------------
aaron.ballman wrote:
> I don't think these should diagnose. They're both harmless as the literal 
> values are exactly representable in the destination type.
Yes indeed they are harmless but why not write the correct literal in the first 
place?
I'm keeping these warnings for now. Let me know if you feel strongly about it.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53488



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to