This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354074: [Sema] Fix-up a -Wfloat-conversion diagnostic
(authored by epilk, committed by ).
Herald added a project: LLVM.
erik.pilkington marked an inline comment as done.
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaChecking.cpp:10634
+ // warning.
+ else if (ResultBT->isFloatingPoint() && ResultBT->getKind() < RBT->getKind()
&&
+ // We don't want to warn for
nickdesaulniers added a comment.
> Fix this by just directly calling DiagnoseImpCast, since we don't really need
> anything DiagnoseFloatingImpCast does anyways.
Good catch; thanks for fixing and improving the tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58145/new/
rjmccall added a comment.
Basically LGTM, especially if we need an emergency fix, but please consider
addressing my comment before committing since I'd expect it to be
straightforward to solve.
Comment at: clang/lib/Sema/SemaChecking.cpp:10634
+ // warning.
+ else if
erik.pilkington updated this revision to Diff 186774.
erik.pilkington marked 2 inline comments as done.
erik.pilkington added a comment.
I was taking a final look at this, and I noticed that we were sending the wrong
arguments to `DiagnoseFloatingImpCast`. The expression argument is meant to be
nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.
Thanks for fixing this regression (sorry, I caused it). Doesn't regress the
tests I added. You'll probably want to request to Hans that this gets picked
up for the 8.0
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, rsmith, nickdesaulniers.
Herald added subscribers: dexonsmith, jkorous.
Herald added a project: clang.
DiagnoseFloatingImpCast expects an integer type, but the changes introduced in
D50467