| 1 |
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected -Werror |
| 2 |
|
| 3 |
float2 test_no_arg() { |
| 4 |
return saturate(); |
| 5 |
// expected-error@-1 {{no matching function for call to 'saturate'}} |
| 6 |
} |
| 7 |
|
| 8 |
float2 test_too_many_arg(float2 p0) { |
| 9 |
return saturate(p0, p0, p0, p0); |
| 10 |
// expected-error@-1 {{no matching function for call to 'saturate'}} |
| 11 |
} |
| 12 |
|
| 13 |
float2 test_saturate_vector_size_mismatch(float3 p0) { |
| 14 |
return saturate(p0); |
| 15 |
// expected-error@-1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'vector<float, 2>'}} |
| 16 |
} |
| 17 |
|
| 18 |
float2 test_saturate_float2_int_splat(int p0) { |
| 19 |
return saturate(p0); |
| 20 |
// expected-error@-1 {{call to 'saturate' is ambiguous}} |
| 21 |
} |
| 22 |
|
| 23 |
float2 test_saturate_int_vect_to_float_vec_promotion(int2 p0) { |
| 24 |
return saturate(p0); |
| 25 |
// expected-error@-1 {{call to 'saturate' is ambiguous}} |
| 26 |
} |
| 27 |
|
| 28 |
float test_saturate_bool_type_promotion(bool p0) { |
| 29 |
return saturate(p0); |
| 30 |
// expected-error@-1 {{call to 'saturate' is ambiguous}} |
| 31 |
} |