[Github] Label lldb-dap PRs (#125139)
[llvm-project.git] / clang / test / ParserHLSL / hlsl_resource_class_attr_error.hlsl
blob63e39daff949b4a7291681c7ed8732a370aa9aff
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify\r
2 \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
5 \r
6 // expected-error@+1{{'resource_class' attribute takes one argument}}\r
7 __hlsl_resource_t [[hlsl::resource_class()]] e1;\r
8 \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