brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 71dad2f Raw
34 lines · plain
1// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or2// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and3 4 5bool test_too_few_arg(bool a)6{7    return TEST_FUNC(a);8  // expected-error@-1 {{too few arguments to function call, expected 2, have 1}}9}10 11bool test_too_many_arg(bool a)12{13    return TEST_FUNC(a, a, a);14  // expected-error@-1 {{too many arguments to function call, expected 2, have 3}}15}16 17bool2 test_mismatched_args(bool2 a, bool3 b)18{19    return TEST_FUNC(a, b);20  // expected-error@-1 {{all arguments to}}{{_builtin_hlsl_or|_builtin_hlsl_and }}{{must have the same type}}21}22 23bool test_incorrect_type(int a)24{25    return TEST_FUNC(a, a);26  // expected-error@-1{{invalid operand of type 'int' where 'bool' or a vector of such type is required}}27}28 29bool test_mismatched_scalars(bool a, int b)30{31  return TEST_FUNC(a, b);32  // expected-error@-1{{all arguments to}}{{_builtin_hlsl_or|_builtin_hlsl_and }}{{must have the same type}}33}34