Skip to content

Commit 82249f5

Browse files
committed
Add more tests
1 parent 592829e commit 82249f5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

clang/test/CodeGenHLSL/cbuffer_align.hlsl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,19 @@ cbuffer CB5Fail {
103103
float f5f : packoffset(c2.x);
104104
// expected-error@-1 {{packoffset overlap between 'f5f', 's5f'}}
105105
}
106+
107+
struct S6 {
108+
float a;
109+
float2 b;
110+
};
111+
112+
cbuffer CB6Pass {
113+
S6 s6p : packoffset(c0.x);
114+
float f6p : packoffset(c0.w);
115+
}
116+
117+
cbuffer CB6Fail {
118+
S6 s6f : packoffset(c0.x);
119+
float f6f : packoffset(c0.y);
120+
// expected-error@-1 {{packoffset overlap between 'f6f', 's6f'}}
121+
}

0 commit comments

Comments
 (0)