Debian Codegraph @

clang/test/SemaHLSL/BuiltIns/WaveActiveBallot-errors.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 uint4 test_too_few_arg() {
4 return __builtin_hlsl_wave_active_ballot();
5 // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
6 }
7
8 uint4 test_too_many_arg(bool p0) {
9 return __builtin_hlsl_wave_active_ballot(p0, p0);
10 // expected-error@-1 {{too many arguments to function call, expected 1, have 2}}
11 }
12
13 struct Foo
14 {
15 int a;
16 };
17
18 uint4 test_type_check(Foo p0) {
19 return __builtin_hlsl_wave_active_ballot(p0);
20 // expected-error@-1 {{no viable conversion from 'Foo' to 'bool'}}
21 }