[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 12:19:22 PDT 2024


================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify
+
+// expected-error at +1{{'row_access' attribute cannot be applied to a declaration}}
+[[hlsl::row_access]] __hlsl_resource_t res0;
+
+// expected-error at +1{{HLSL resource needs to have [[hlsl::resource_class()]] attribute}}
+__hlsl_resource_t [[hlsl::row_access]] res1;
----------------
bogner wrote:

This case is/should be covered by the resource class tests, I don't think we need to duplicate it here.

https://github.com/llvm/llvm-project/pull/107954


More information about the cfe-commits mailing list