Go to file
Richard Trieu be234c30ad Split interesting warnings off from -Wfloat-conversion
Restructure the implict floating point to integer conversions so that
interesting sub-groups are under different flags.  Breakdown of warnings:

No warning:
Exact conversions from floating point to integer:
int x = 10.0;
int x = 1e10;

-Wliteral-conversion - Floating point literal to integer with rounding:
int x = 5.5;
int x = -3.4;

-Wfloat-conversion - All conversions not covered by the above two:
int x = GetFloat();
int x = 5.5 + 3.5;

-Wfloat-zero-conversion - The expression converted has a non-zero floating
point value that gets converted to a zero integer value, excluded the cases
falling under -Wliteral-conversion.  Subset of -Wfloat-conversion.
int x = 1.0 / 2.0;

-Wfloat-overflow-conversion - The floating point value is outside the range
of the integer type, exluding cases from -Wliteral conversion.  Subset of
-Wfloat-conversion.
char x = 500;
char x = -1000;

-Wfloat-bool-conversion - Any conversion of a floating point type to bool.
Subset of -Wfloat-conversion.
if (GetFloat()) {}
bool x = 5.0;

-Wfloat-bool-constant-conversion - Conversion of a compile time evaluatable
floating point value to bool.  Subset of -Wfloat-bool-conversion.
bool x = 1.0;
bool x = 4.0 / 20.0;

Also add EvaluateAsFloat to Sema, which is similar to EvaluateAsInt, but for
floating point values.

llvm-svn: 267054
2016-04-21 21:04:55 +00:00
clang Split interesting warnings off from -Wfloat-conversion 2016-04-21 21:04:55 +00:00
clang-tools-extra [clang-tidy] Fix broken build bot. 2016-04-21 18:15:35 +00:00
compiler-rt [asan] Mark strdup test as unsupported on arm/linux. 2016-04-21 18:18:09 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc prepare-builtins: Remove call to getGlobalContext() 2016-04-15 14:18:58 +00:00
libcxx [libc++] fix macro redef warning when exception is disabled 2016-04-21 05:28:18 +00:00
libcxxabi Enable testing for static libc++abi 2016-04-19 12:47:38 +00:00
libunwind unwind: remove another instance of -Wexpansion-to-defined 2016-04-20 22:18:50 +00:00
lld Remove SymPair and instead use two DefinedRegulars instead. 2016-04-21 20:50:15 +00:00
lldb Update Go OS Plugin for newer runtimes. 2016-04-21 20:57:28 +00:00
llgo benchcomp: Add a mode for analyzing rule execution time in ninja log files. 2016-04-08 22:42:22 +00:00
llvm add tests for disguised fabs/fneg 2016-04-21 21:02:25 +00:00
openmp [ITTNOTIFY] Remove serialized parallel regions from frame notification 2016-04-19 16:55:17 +00:00
polly Relate domains to statements during construction [NFC] 2016-04-19 14:53:13 +00:00