[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 22:09:41 PDT 2024


================
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
+
+
+// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} <<invalid sloc>> SRV
+struct [[hlsl::resource_class(SRV)]] Eg1 {
----------------
bogner wrote:

For the purpose of these tests it shouldn't matter very much - we can just apply the attribute to whatever since we're just checking that the AST picks up the attribute correctly.

Also as far as things like RWBuffer go this change doesn't actually move the attribute to the handle member, that's a later part of #98192

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


More information about the cfe-commits mailing list