1 // RUN: %clang_cc1 -verify -fsyntax-only %s -Wfloat-conversion
2 
ReturnBool(float f)3 bool ReturnBool(float f) {
4   return f;  //expected-warning{{conversion}}
5 }
6 
ReturnChar(float f)7 char ReturnChar(float f) {
8   return f;  //expected-warning{{conversion}}
9 }
10 
ReturnInt(float f)11 int ReturnInt(float f) {
12   return f;  //expected-warning{{conversion}}
13 }
14 
ReturnLong(float f)15 long ReturnLong(float f) {
16   return f;  //expected-warning{{conversion}}
17 }
18 
Convert(float f,double d,long double ld)19 void Convert(float f, double d, long double ld) {
20   bool b;
21   char c;
22   int i;
23   long l;
24 
25   b = f;  //expected-warning{{conversion}}
26   b = d;  //expected-warning{{conversion}}
27   b = ld;  //expected-warning{{conversion}}
28   c = f;  //expected-warning{{conversion}}
29   c = d;  //expected-warning{{conversion}}
30   c = ld;  //expected-warning{{conversion}}
31   i = f;  //expected-warning{{conversion}}
32   i = d;  //expected-warning{{conversion}}
33   i = ld;  //expected-warning{{conversion}}
34   l = f;  //expected-warning{{conversion}}
35   l = d;  //expected-warning{{conversion}}
36   l = ld;  //expected-warning{{conversion}}
37 }
38 
39