Currently, both warn_impcast_integer_float_precision_constant and
warn_impcast_integer_float_precision are covered by
-Wimplicit-int-float-conversion, but only the ..._constant warning is on
by default.
warn_impcast_integer_float_precision_constant likely flags real problems
while warn_impcast_integer_float_precision may flag legitimate use
cases (for example, int used with limited range supported by float).
If -Wno-implicit-int-float-conversion is used, currently there is no way
to restore the ..._constant warning. This patch adds
-Wimplicit-const-int-float-conversion to address the issue. (Similar to
the reasoning in https://reviews.llvm.org/D64666#1598194)
Adapted from a patch by Brooks Moses.
If I understand the bug description properly:
You should add a test based on the description where you disable -Wimplicit-int-float-conversion, then re-enable -Wimplicit-const-int-float-conversion, and observe -Wimplicit-const-int-float-conversion diagnostics. ie.