Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / fmaxfmin-invalid-arguments-type.c
blob3da41b40b4069780ccad31e1a50ed0e36d3e2b1b
1 // RUN: not %clang_cc1 -triple x86_64 %s -fsyntax-only -verify 2>&1 | FileCheck %s --check-prefix=CHECK-ERR
3 float fminimum_numf (float, float);
4 double fminimum_num (double, double);
5 long double fminimum_numl (long double, long double);
6 float fmaximum_numf (float, float);
7 double fmaximum_num (double, double);
8 long double fmaximum_numl (long double, long double);
10 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'float'
11 float fmin1(char *a, char *b) {
12 return fminimum_numf(a, b);
14 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'double'
15 float fmin2(char *a, char *b) {
16 return fminimum_num(a, b);
18 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'long double'
19 float fmin3(char *a, char *b) {
20 return fminimum_numl(a, b);
22 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'float'
23 float fmax1(char *a, char *b) {
24 return fmaximum_numf(a, b);
26 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'double'
27 float fmax2(char *a, char *b) {
28 return fmaximum_num(a, b);
30 // CHECK-ERR: passing 'char *' to parameter of incompatible type 'long double'
31 float fmax3(char *a, char *b) {
32 return fmaximum_numl(a, b);