]> granicus.if.org Git - clang/commit
[Diagnostics] Check integer to floating point number implicit conversions
authorDavid Bolvansky <david.bolvansky@gmail.com>
Wed, 14 Nov 2018 14:24:33 +0000 (14:24 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Wed, 14 Nov 2018 14:24:33 +0000 (14:24 +0000)
commitf137da261070a9ece08a9ff74e52aa278a428d13
tree3e1fcfabe22dc5a5a0f157be3a575e62920ae8b2
parent15f792eb0f51d2fa8189a31b9c71dc45e4fb02fa
[Diagnostics] Check integer to floating point number implicit conversions

Summary:
GCC already catches these situations so we should handle it too.

GCC warns in C++ mode only (does anybody know why?). I think it is useful in C mode too.

Reviewers: rsmith, erichkeane, aaron.ballman, efriedma, xbolva00

Reviewed By: xbolva00

Subscribers: efriedma, craig.topper, scanon, cfe-commits

Differential Revision: https://reviews.llvm.org/D52835

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346865 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/Sema/ext_vector_casts.c
test/Sema/impcast-integer-float.c [new file with mode: 0644]