brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 4054ebf Raw
32 lines · plain
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 -Werror2 3float2 test_no_arg() {4  return saturate();5  // expected-error@-1 {{no matching function for call to 'saturate'}}6}7 8float2 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 13float2 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 18float2 test_saturate_float2_int_splat(int p0) {19  return saturate(p0);20  // expected-error@-1 {{call to 'saturate' is ambiguous}}21}22 23float2 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 28float test_saturate_bool_type_promotion(bool p0) {29  return saturate(p0);30  // expected-error@-1 {{call to 'saturate' is ambiguous}}31}32