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 | 7555b6a4e51e9cb0c54da10b8951104306cfdcbb (patch) | |
tree | 0ac4aca829d7d05de81a789e30a4b7add22523b7 /clang/test/Analysis/array-struct-region.c | |
parent | 80297b1d90de16b8f574848a9a2fb46f957f246a (diff) | |
download | bcm5719-llvm-7555b6a4e51e9cb0c54da10b8951104306cfdcbb.tar.gz bcm5719-llvm-7555b6a4e51e9cb0c54da10b8951104306cfdcbb.zip |
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.
llvm-svn: 156826
Diffstat (limited to 'clang/test/Analysis/array-struct-region.c')
-rw-r--r-- | clang/test/Analysis/array-struct-region.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Analysis/array-struct-region.c b/clang/test/Analysis/array-struct-region.c index 8be86883a00..18d5b2a3752 100644 --- a/clang/test/Analysis/array-struct-region.c +++ b/clang/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) { |