Skip to content

Commit b134c4a

Browse files
committed
fixup: unsigned int in test
1 parent ab8b8af commit b134c4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
using handle_t = __hlsl_resource_t
55
[[hlsl::resource_class(UAV)]] [[hlsl::contained_type(int)]];
66

7-
void test_args(int x) {
7+
void test_args(unsigned int x) {
88
// expected-error@+1 {{too few arguments to function call, expected 2, have 1}}
99
__builtin_hlsl_resource_getpointer(x);
1010

1111
// expected-error@+1 {{too many arguments to function call, expected 2, have 3}}
1212
__builtin_hlsl_resource_getpointer(x, x, x);
1313

14-
// expected-error@+1 {{used type 'int' where __hlsl_resource_t is required}}
14+
// expected-error@+1 {{used type 'unsigned int' where __hlsl_resource_t is required}}
1515
__builtin_hlsl_resource_getpointer(x, x);
1616

1717
handle_t res;
1818

19-
// expected-error@+1 {{passing 'const char *' to parameter of incompatible type 'int'}}
19+
// expected-error@+1 {{passing 'const char *' to parameter of incompatible type 'unsigned int'}}
2020
__builtin_hlsl_resource_getpointer(res, "1");
2121

2222
// no error
23-
__builtin_hlsl_resource_getpointer(res, 0);
23+
__builtin_hlsl_resource_getpointer(res, 0u);
2424

2525
// no error
2626
__builtin_hlsl_resource_getpointer(res, x);

0 commit comments

Comments
 (0)