[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / overloaded-math-builtins.c
blobe18b98ab8d5542845e114289eb73e636c552e79d
1 // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9
3 typedef float float4 __attribute__((ext_vector_type(4)));
5 float test_fminf(float f, int i, int *ptr, float4 v) {
6 float r1 = __builtin_fminf(f, ptr);
7 // expected-error@-1 {{passing 'int *' to parameter of incompatible type 'float'}}
8 float r2 = __builtin_fminf(ptr, f);
9 // expected-error@-1 {{passing 'int *' to parameter of incompatible type 'float'}}
10 float r3 = __builtin_fminf(v, f);
11 // expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}}
12 float r4 = __builtin_fminf(f, v);
13 // expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}}
16 int *r5 = __builtin_fminf(f, f);
17 // expected-error@-1 {{initializing 'int *' with an expression of incompatible type 'float'}}
19 int *r6 = __builtin_fminf(f, v);
20 // expected-error@-1 {{passing 'float4' (vector of 4 'float' values) to parameter of incompatible type 'float'}}