]> granicus.if.org Git - clang/commit
Fix float->int conversion warnings when near barriers.
authorErich Keane <erich.keane@intel.com>
Tue, 8 May 2018 21:26:21 +0000 (21:26 +0000)
committerErich Keane <erich.keane@intel.com>
Tue, 8 May 2018 21:26:21 +0000 (21:26 +0000)
commit65d5e3d8ade9a0122899efcf3b53b37b0632ea98
tree37a6c991000dd6a84df273a6a12cfd0dcd6e890f
parent31df10b0f032b02e4eb2164f6de9855dadcb2c02
Fix float->int conversion warnings when near barriers.

As Eli brought up here: https://reviews.llvm.org/D46535
I'd previously messed up this fix by missing conversions
that are just slightly outside the range.  This patch fixes
this by no longer ignoring the return value of
convertToInteger.  Additionally, one of the error messages
wasn't very sensical (mentioning out of range value, when it
really was not), so it was cleaned up as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331812 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/SemaCXX/warn-float-conversion.cpp
test/SemaCXX/warn-literal-conversion.cpp