Debian Codegraph @

clang/test/SemaHLSL/BuiltIns/firstbithigh-errors.hlsl

raw
1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
2
3 int test_too_few_arg() {
4 return firstbithigh();
5 // expected-error@-1 {{no matching function for call to 'firstbithigh'}}
6 }
7
8 int test_too_many_arg(int p0) {
9 return firstbithigh(p0, p0);
10 // expected-error@-1 {{no matching function for call to 'firstbithigh'}}
11 }
12
13 double test_int_builtin(double p0) {
14 return firstbithigh(p0);
15 // expected-error@-1 {{no matching function for call to 'firstbithigh'}}
16 }
17
18 double2 test_int_builtin_2(double2 p0) {
19 return __builtin_hlsl_elementwise_firstbithigh(p0);
20 // expected-error@-1 {{1st argument must be a scalar or vector of integer types (was 'double2' (aka 'vector<double, 2>'))}}
21 }
22
23 float test_int_builtin_3(float p0) {
24 return __builtin_hlsl_elementwise_firstbithigh(p0);
25 // expected-error@-1 {{1st argument must be a scalar or vector of integer types (was 'double')}}
26 }