19 lines · plain
1// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify2 3int 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}}6}7 8int 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}}11}12 13struct S { float f; };14 15int 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'}}18}19