1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify
3 int test_too_few_arg() {
4 return __builtin_hlsl_wave_active_count_bits();
5 // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
8 int test_too_many_arg(bool x) {
9 return __builtin_hlsl_wave_active_count_bits(x, x);
10 // expected-error@-1 {{too many arguments to function call, expected 1, have 2}}
13 struct S { float f; };
15 int test_bad_conversion(S x) {
16 return __builtin_hlsl_wave_active_count_bits(x);
17 // expected-error@-1 {{no viable conversion from 'S' to 'bool'}}