| 1 |
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify |
| 2 |
|
| 3 |
int test_too_few_arg0() { |
| 4 |
return __builtin_hlsl_dot4add_u8packed(); |
| 5 |
// expected-error@-1 {{too few arguments to function call, expected 3, have 0}} |
| 6 |
} |
| 7 |
|
| 8 |
int test_too_few_arg1(int p0) { |
| 9 |
return __builtin_hlsl_dot4add_u8packed(p0); |
| 10 |
// expected-error@-1 {{too few arguments to function call, expected 3, have 1}} |
| 11 |
} |
| 12 |
|
| 13 |
int test_too_few_arg2(uint p0) { |
| 14 |
return __builtin_hlsl_dot4add_u8packed(p0, p0); |
| 15 |
// expected-error@-1 {{too few arguments to function call, expected 3, have 2}} |
| 16 |
} |
| 17 |
|
| 18 |
int test_too_many_arg(uint p0) { |
| 19 |
return __builtin_hlsl_dot4add_u8packed(p0, p0, p0, p0); |
| 20 |
// expected-error@-1 {{too many arguments to function call, expected 3, have 4}} |
| 21 |
} |
| 22 |
|
| 23 |
struct S { float f; }; |
| 24 |
|
| 25 |
int test_expr_struct_type_check(S p0, uint p1) { |
| 26 |
return __builtin_hlsl_dot4add_u8packed(p1, p1, p0); |
| 27 |
// expected-error@-1 {{no viable conversion from 'S' to 'unsigned int'}} |
| 28 |
} |