diff options
author | Kristof Umann <dkszelethus@gmail.com> | 2018-11-16 01:00:55 +0000 |
---|---|---|
committer | Kristof Umann <dkszelethus@gmail.com> | 2018-11-16 01:00:55 +0000 |
commit | 9d6c4402c667e85eda381b1c0bff11005acaf459 (patch) | |
tree | dcbfeb7e8ad366cccca0fd522167321a31fd7e1e /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | ad9d68c2b44dce12e13bf038f27ba5182b655345 (diff) | |
download | bcm5719-llvm-9d6c4402c667e85eda381b1c0bff11005acaf459.tar.gz bcm5719-llvm-9d6c4402c667e85eda381b1c0bff11005acaf459.zip |
[analyzer] ConversionChecker: handle floating point
Extend the alpha.core.Conversion checker to handle implicit converions
where a too large integer value is converted to a floating point type. Each
floating point type has a range where it can exactly represent all integers; we
emit a warning when the integer value is above this range. Although it is
possible to exactly represent some integers which are outside of this range
(those that are divisible by a large enough power of 2); we still report cast
involving those, because their usage may lead to bugs. (For example, if 1<<24
is stored in a float variable x, then x==x+1 holds.)
Patch by: DonĂ¡t Nagy!
Differential Revision: https://reviews.llvm.org/D52730
llvm-svn: 347006
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions