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