[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 16 13:24:34 PST 2018
xbolva00 marked an inline comment as done.
xbolva00 added inline comments.
================
Comment at: test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp:136
Agg<float> f8 = {EnumVal}; // OK
+ // expected-warning at +1 {{implicit conversion from 'int' to 'float' changes value from 123456789 to 1.2345679E+8}}
Agg<float> f9 = {123456789}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
----------------
aaron.ballman wrote:
> I don't think we want the warning triggered in either of these cases -- they already have an error diagnostic on the same line for the same issue.
Any recommended way how it should be handled?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52835/new/
https://reviews.llvm.org/D52835
More information about the cfe-commits
mailing list