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/Analysis/array-struct-region.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/Analysis/array-struct-region.c')
-rw-r--r-- | test/Analysis/array-struct-region.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Analysis/array-struct-region.c b/test/Analysis/array-struct-region.c index 8be86883a0..18d5b2a375 100644 --- a/test/Analysis/array-struct-region.c +++ b/test/Analysis/array-struct-region.c @@ -25,8 +25,8 @@ int string_literal_init() { } void nested_compound_literals(int rad) { - int vec[6][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, // expected-warning 6 {{implicit conversion turns literal floating-point number into integer}} - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; // expected-warning 6 {{implicit conversion turns literal floating-point number into integer}} + int vec[6][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, // expected-warning 6 {{implicit conversion from 'double' to 'int' changes value from}} + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; // expected-warning 6 {{implicit conversion from 'double' to 'int' changes value from}} int a; for (a = 0; a < 6; ++a) { |