diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-05-15 16:56:36 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-05-15 16:56:36 +0000 |
commit | be0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff (patch) | |
tree | 351c48682f0a027cc17dfe30ba4c2776ae74baec /test/Sema/array-init.c | |
parent | 8f674a80529b327a88be665defcc0163089916e4 (diff) |
Improve some of the conversion warnings to fire on conversion to bool.
Moves the bool bail-out down a little in SemaChecking - so now
-Wnull-conversion and -Wliteral-conversion can fire when the target type is
bool.
Also improve the wording/details in the -Wliteral-conversion warning to match
the -Wconstant-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r-- | test/Sema/array-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index 26c0b24182..cfdf8e2bd7 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -50,7 +50,7 @@ void func() { static long x2[3] = { 1.0, "abc", // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}} - 5.8 }; // expected-warning {{implicit conversion turns literal floating-point number into integer}} + 5.8 }; // expected-warning {{implicit conversion from 'double' to 'long' changes value from 5.8 to 5}} } void test() { |