[PATCH] D42728: Add more warnings for implict conversions (e.g. double truncation to float).
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 12:15:35 PST 2018
rjmccall added a comment.
In https://reviews.llvm.org/D42728#1015649, @avt77 wrote:
> I'm not sure I understand you. There is a special branch in CheckImplicitConversion related to FloatingPoint:
>
> if (SourceBT && SourceBT->isFloatingPoint()) {
> // ...and the target is floating point...
> if (TargetBT && TargetBT->isFloatingPoint()) {
> // ...then warn if we're dropping FP rank.
>
>
> And that's exactly our case. How can knowledge about "part of a compound assignment" improve the diagnostic here? Please, clarify.
The diagnostic text for this warning is misleading at best when the conversion is actually a truncation of the result of a compound assignment.
https://reviews.llvm.org/D42728
More information about the llvm-commits
mailing list