HomePhabricator

[Sema] Enable -Wimplicit-float-conversion for integral to floating point…

Description

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

Issue an warning when the code tries to do an implicit int -> float
conversion, where the float type ha a narrower significant than the
float type.

The new warning is controlled by flag -Wimplicit-int-float-conversion,
under -Wimplicit-float-conversion and -Wconversion. It is also silenced
when c++11 narrowing warning is issued.

Differential Revision: https://reviews.llvm.org/D64666

Details

Committed
ziangwan725Jul 31 2019, 5:16 PM
Differential Revision
D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss
Branches
Unknown
Tags
Unknown