44 lines · plain
1// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -fnative-int16-type -verify2 3 4int16_t4 test_asint16_too_many_arg(uint16_t p0, uint16_t p1)5{6 return asint16(p0, p1);7 // expected-error@-1 {{no matching function for call to 'asint16'}}8 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate function template not viable: requires single argument 'V', but 2 arguments were provided}}9 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate function template not viable: requires single argument 'F', but 2 arguments were provided}}10}11 12int16_t test_asint16_int(int p1)13{14 return asint16(p1);15 // expected-error@-1 {{no matching function for call to 'asint16'}}16 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: could not match 'vector<T, N>' against 'int'}}17 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = int]: no type named 'Type'}}18}19 20int16_t test_asint16_float(float p1)21{22 return asint16(p1);23 // expected-error@-1 {{no matching function for call to 'asint16'}}24 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: could not match 'vector<T, N>' against 'float'}}25 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = float]: no type named 'Type'}}26}27 28int16_t4 test_asint16_vector_int(int4 p1)29{30 return asint16(p1);31 // expected-error@-1 {{no matching function for call to 'asint16'}}32 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = int, N = 4]: no type named 'Type'}}33 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = int4]: no type named 'Type'}}34}35 36int16_t4 test_asint16_vector_float(float4 p1)37{38 return asint16(p1);39 // expected-error@-1 {{no matching function for call to 'asint16'}}40 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = float, N = 4]: no type named 'Type'}}41 // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate template ignored: substitution failure [with T = float4]: no type named 'Type'}}42}43 44