[clang] [HLSL] Constant buffer layout struct update (PR #124840)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 11:20:30 PST 2025
================
@@ -48,94 +48,108 @@ struct TwoFloats {
// CHECK: HLSLResourceClassAttr {{.*}} Implicit CBuffer
// CHECK: HLSLResourceAttr {{.*}} Implicit CBuffer
cbuffer CB {
- // CHECK: VarDecl {{.*}} col:9 used a1 'hlsl_constant float'
+ // CHECK: VarDecl {{.*}} used a1 'hlsl_constant float'
float a1;
- // CHECK: CXXRecordDecl {{.*}} implicit referenced class __layout_CB definition
- // CHECK: FieldDecl {{.*}} a1 'float'
+ // CHECK: CXXRecordDecl {{.*}} implicit referenced struct __cblayout_CB definition
+ // CHECK: PackedAttr
+ // CHECK-NEXT: FieldDecl {{.*}} a1 'float'
}
-_Static_assert(__builtin_hlsl_is_scalarized_layout_compatible(OneFloat, __layout_CB), "");
+_Static_assert(__builtin_hlsl_is_scalarized_layout_compatible(OneFloat, __cblayout_CB), "");
// Check that buffer layout struct does not include resources or empty types
-// CHECK: HLSLBufferDecl {{.*}} line:62:9 cbuffer CB
+// CHECK: HLSLBufferDecl {{.*}} line:[[# @LINE + 3]]:9 cbuffer CB
----------------
bob80905 wrote:
Strange, this used to be 62, but now you've changed it to line + 3, and it's on line 60, which should add up to 63. Well, if it passes it's probably right.
https://github.com/llvm/llvm-project/pull/124840
More information about the cfe-commits
mailing list