[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:04:44 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 {
+ int i;
+};
+
+Eg1 e1;
+
+// CHECK: -CXXRecordDecl 0x{{[0-9a-f]+}} <line:13:1, line:15:1> line:13:38 referenced struct Eg2 definition
+// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} <<invalid sloc>> UAV
+struct [[hlsl::resource_class(UAV)]] Eg2 {
----------------
bogner wrote:
I'm surprised this has an invalid source location given that it's coming from the source. Did you use the right constructor for the attribute?
https://github.com/llvm/llvm-project/pull/98419
More information about the cfe-commits
mailing list