[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-14 Thread Phabricator via Phabricator via cfe-commits
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.

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-14 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-14 Thread Nick Desaulniers via Phabricator via cfe-commits
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/

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-13 Thread John McCall via Phabricator via cfe-commits
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

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-12 Thread Nick Desaulniers via Phabricator via cfe-commits
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

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-12 Thread Erik Pilkington via Phabricator via cfe-commits
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