1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify
\r
3 // expected-error@+1{{'resource_class' attribute cannot be applied to a declaration}}
\r
4 [[hlsl::resource_class(UAV)]] __hlsl_resource_t e0;
\r
6 // expected-error@+1{{'resource_class' attribute takes one argument}}
\r
7 __hlsl_resource_t [[hlsl::resource_class()]] e1;
\r
9 // expected-warning@+1{{ResourceClass attribute argument not supported: gibberish}}
\r
10 __hlsl_resource_t [[hlsl::resource_class(gibberish)]] e2;
\r
12 // expected-warning@+1{{attribute 'resource_class' is already applied with different arguments}}
\r
13 __hlsl_resource_t [[hlsl::resource_class(SRV)]] [[hlsl::resource_class(UAV)]] e3;
\r
15 // expected-warning@+1{{attribute 'resource_class' is already applied}}
\r
16 __hlsl_resource_t [[hlsl::resource_class(SRV)]] [[hlsl::resource_class(SRV)]] e4;
\r
18 // expected-error@+1{{'resource_class' attribute takes one argument}}
\r
19 __hlsl_resource_t [[hlsl::resource_class(SRV, "aa")]] e5;
\r
21 // expected-error@+1{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}}
\r
22 float [[hlsl::resource_class(UAV)]] e6;
\r