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

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 23 16:52:49 PDT 2019


jfb added a comment.

Thanks, the update looks good.

One thing I just noticed: if I have a codebase with `-Wimplicit-float-conversion` it seems like updating clang will automatically turn the two new warnings on, correct? That seems good, but also difficult to roll out because I can't turns off just the two new warnings. In other words, if I want to adopt a new clang and I had `-Wimplicit-float-conversion` then the only options I have are: fix all the new warnings (which might take time given how much code I have), or turn off *all* of `-Wimplicit-float-conversion`. I think it makes sense to force fixing all warnings for the warning that's always a problem `warn_impcast_integer_float_precision_constant`, but for `warn_impcast_integer_float_precision` it would be nice if there were a `-Wno-*` which disables only `warn_impcast_integer_float_precision` and nothing else.
This would make it way easier to roll out a new clang.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64666/new/

https://reviews.llvm.org/D64666





More information about the cfe-commits mailing list