[Sema] Split off warn_impcast_integer_float_precision_constant into...
[Sema] Split off warn_impcast_integer_float_precision_constant into -Wimplicit-const-int-float-conversion 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. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D78661
Loading
Please register or sign in to comment