[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss
Ziang Wan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 10:42:08 PDT 2019
ziangwan marked an inline comment as done.
ziangwan added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:11429
+ S.Context.getFloatTypeSemantics(QualType(TargetBT, 0)));
+ TargetFloatValue.convertFromAPInt(SourceInt,
+ SourceBT->isSignedInteger(), llvm::APFloat::rmNearestTiesToEven);
----------------
scanon wrote:
> Why don't we just check that the result of the first conversion is opOK? I don't think doing a round-trip check is required here.
I have changed the code to check the status of the first conversion only. Please review it again.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64666/new/
https://reviews.llvm.org/D64666
More information about the cfe-commits
mailing list