Lines Matching +full:zero +full:- +full:point

1 …c1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-literal-conversion -Wfloat-conversion…
2 // RUN: %clang_cc1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-conversion -Wfloat-ove…
3 // RUN: %clang_cc1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-conversion -Wfloat-zer…
9 return f; //expected-warning{{conversion}} in ReturnBool()
13 return f; //expected-warning{{conversion}} in ReturnChar()
17 return f; //expected-warning{{conversion}} in ReturnInt()
21 return f; //expected-warning{{conversion}} in ReturnLong()
30 b = f; //expected-warning{{conversion}} in Convert()
31 b = d; //expected-warning{{conversion}} in Convert()
32 b = ld; //expected-warning{{conversion}} in Convert()
33 c = f; //expected-warning{{conversion}} in Convert()
34 c = d; //expected-warning{{conversion}} in Convert()
35 c = ld; //expected-warning{{conversion}} in Convert()
36 i = f; //expected-warning{{conversion}} in Convert()
37 i = d; //expected-warning{{conversion}} in Convert()
38 i = ld; //expected-warning{{conversion}} in Convert()
39 l = f; //expected-warning{{conversion}} in Convert()
40 l = d; //expected-warning{{conversion}} in Convert()
41 l = ld; //expected-warning{{conversion}} in Convert()
47 …x += 1.234; // expected-warning {{implicit conversion turns floating-point number into integer: 'd… in CompoundAssignment()
48 …x -= -0.0; // expected-warning {{implicit conversion turns floating-point number into integer: 'd… in CompoundAssignment()
49 …x *= 1.1f; // expected-warning {{implicit conversion turns floating-point number into integer: 'f… in CompoundAssignment()
50 …x /= -2.2f; // expected-warning {{implicit conversion turns floating-point number into integer: 'f… in CompoundAssignment()
52 …int y = x += 1.4f; // expected-warning {{implicit conversion turns floating-point number into inte… in CompoundAssignment()
55 double w = -2.2; in CompoundAssignment()
57 …y += z + w; // expected-warning {{implicit conversion turns floating-point number into integer: 'd… in CompoundAssignment()
63 # 1 "warn-float-conversion.cpp" 1
71 int a1 = 10.0/2.0; //expected-warning{{conversion}} in Test()
72 int a2 = 1.0/2.0; //expected-warning{{conversion}} in Test()
73 bool a3 = ReturnFloat(); //expected-warning{{conversion}} in Test()
74 int a4 = 1e30 + 1; //expected-warning{{conversion}} in Test()
82 int a3 = 5.5; // caught by -Wliteral-conversion in TestConstantFloat()
83 int a4 = 500.44; // caught by -Wliteral-convserion in TestConstantFloat()
85 int b1 = 5.0 / 1.0; //expected-warning{{conversion}} in TestConstantFloat()
86 int b2 = 5.0 / 2.0; //expected-warning{{conversion}} in TestConstantFloat()
90 int b3 = five / 1.0; //expected-warning{{conversion}} in TestConstantFloat()
91 int b4 = five / 2.0; //expected-warning{{conversion}} in TestConstantFloat()
93 …int f = 2147483646.5 + 1; // expected-warning{{implicit conversion from 'double' to 'int' changes … in TestConstantFloat()
94 …unsigned g = -.5 + .01; // expected-warning{{implicit conversion from 'double' to 'unsigned int' c… in TestConstantFloat()
98 #ifdef ZERO
101 …int a1 = half; // expected-warning{{implicit conversion from 'const float' to 'int' changes non-z… in TestZero()
102 …int a2 = 1.0 / 2.0; // expected-warning{{implicit conversion from 'double' to 'int' changes non-z… in TestZero()
105 #endif // ZERO
109 char a = 500.0; // caught by -Wliteral-conversion in TestOverflow()
110 char b = -500.0; // caught by -Wliteral-conversion in TestOverflow()
113 …char c = LargeNumber; // expected-warning{{implicit conversion of out of range value from 'const … in TestOverflow()
114 …char d = 400.0 + 400.0; // expected-warning{{implicit conversion of out of range value from 'doub… in TestOverflow()
116 …char e = 1.0 / 0.0; // expected-warning{{implicit conversion of out of range value from 'double' … in TestOverflow()
135 …return ret; // expected-warning {{implicit conversion of out of range value from 'const float' to… in run1()
149 …char b = run1(b) + run2(b); // expected-note {{in instantiation of function template specializati… in test()