[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. In D64666#1583633 , @xbolva00 wrote: > You can check also https://reviews.llvm.org/D52835. I hit there issue which I > didn't know how to solve. Hi David, I have read your patch. I think that integer-to-floating-point conversi

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. I also recommend re-titling the commit to something like: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Eino-Ville Talvala via Phabricator via cfe-commits
etalvala added inline comments. Comment at: clang/test/Sema/implicit-float-conversion.c:29 + double e = 0.0; + double f = i + e; +} should this also test the case of: ` long g = L; long h = g + a; ` or is that unlikely to fail if the assignment-to-f

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch @ziangwan ! Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, DefaultIgnor

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. You can check also https://reviews.llvm.org/D52835. I hit there issue which I didn't know how to solve. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 ___ cfe-commits mail

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan updated this revision to Diff 209591. ziangwan added a comment. Removed patch.patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Driver/ToolChains/Arch/AArch64.cp

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. You have patch.patch in the diff above. You should drop that. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 ___ cfe-commits mailing list cfe-commits

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think you want to default-ignore the "may lose precision" warnings, but not the ones that you know always lose precision. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 _

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan created this revision. ziangwan added reviewers: kongyi, pirama, rsmith, nickdesaulniers. Herald added subscribers: cfe-commits, jdoerfert, jfb, mgrang, javed.absar. Herald added a project: clang. These code: long i = L; float a = L: float b = a + i; Will n