Debian Codegraph @

clang/test/SemaHLSL/BuiltIns/WaveActiveMin.hlsl

raw
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_arg() {
4 return __builtin_hlsl_wave_active_min();
5 // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
6 }
7
8 float2 test_too_many_arg(float2 p0) {
9 return __builtin_hlsl_wave_active_min(p0, p0);
10 // expected-error@-1 {{too many arguments to function call, expected 1, have 2}}
11 }
12
13 bool test_expr_bool_type_check(bool p0) {
14 return __builtin_hlsl_wave_active_min(p0);
15 // expected-error@-1 {{invalid operand of type 'bool'}}
16 }
17
18 bool2 test_expr_bool_vec_type_check(bool2 p0) {
19 return __builtin_hlsl_wave_active_min(p0);
20 // expected-error@-1 {{invalid operand of type 'bool2' (aka 'vector<bool, 2>')}}
21 }
22
23 struct S { float f; };
24
25 S test_expr_struct_type_check(S p0) {
26 return __builtin_hlsl_wave_active_min(p0);
27 // expected-error@-1 {{invalid operand of type 'S' where a scalar or vector is required}}
28 }
29