1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify
\r
3 // expected-error@+1{{'raw_buffer' attribute cannot be applied to a declaration}}
\r
4 [[hlsl::raw_buffer]] __hlsl_resource_t res0;
\r
6 // expected-error@+1{{'raw_buffer' attribute takes no arguments}}
\r
7 __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer(3)]] res2;
\r
9 // expected-error@+1{{use of undeclared identifier 'gibberish'}}
\r
10 __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer(gibberish)]] res3;
\r
12 // expected-warning@+1{{attribute 'raw_buffer' is already applied}}
\r
13 __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] [[hlsl::raw_buffer]] res4;
\r
15 // expected-error@+2{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}}
\r
16 // expected-error@+1{{attribute 'raw_buffer' can be used only on HLSL intangible type '__hlsl_resource_t'}}
\r
17 float [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] res5;
\r