Lines Matching +full:- +full:wconversion
1 // RUN: %clang_cc1 -fsyntax-only -Wliteral-conversion -verify %s
8 …int y0 = 1.2222F; // expected-warning {{implicit conversion from 'float' to 'int' changes value fr… in test0()
9 …int y1 = (1.2222F); // expected-warning {{implicit conversion from 'float' to 'int' changes value … in test0()
10 …int y2 = (((1.2222F))); // expected-warning {{implicit conversion from 'float' to 'int' changes va… in test0()
11 …int y3 = 12E-1F; // expected-warning {{implicit conversion from 'float' to 'int' changes value fro… in test0()
12 …int y4 = 1.23E1F; // expected-warning {{implicit conversion from 'float' to 'int' changes value fr… in test0()
14 …int y5 = 1.2222; // expected-warning {{implicit conversion from 'double' to 'int' changes value fr… in test0()
15 …int y6 = 12E-1; // expected-warning {{implicit conversion from 'double' to 'int' changes value fro… in test0()
16 …int y7 = 1.23E1; // expected-warning {{implicit conversion from 'double' to 'int' changes value fr… in test0()
17 …int y8 = (1.23E1); // expected-warning {{implicit conversion from 'double' to 'int' changes value … in test0()
20 …y8 = 2.22F; // expected-warning {{implicit conversion from 'float' to 'int' changes value from 2.2… in test0()
23 …int y9(1.23F); // expected-warning {{implicit conversion from 'float' to 'int' changes value from … in test0()
25 // Test passing a literal floating-point value to a function that takes an integer. in test0()
26 …foo(1.2F); // expected-warning {{implicit conversion from 'float' to 'int' changes value from 1.2 … in test0()
28 …int y10 = -1.2F; // expected-warning {{implicit conversion from 'float' to 'int' changes value fr… in test0()
30 // -Wliteral-conversion does NOT catch const values. in test0()
31 // (-Wconversion DOES catch them.) in test0()
36 // Expressions, such as those that indicate rounding-down, should NOT produce warnings. in test0()
45 …bool b1 = 0.99f; // expected-warning {{implicit conversion from 'float' to 'bool' changes value fr… in test1()
46 …bool b2 = 0.99; // expected-warning {{implicit conversion from 'double' to 'bool' changes value fr… in test1()