================
@@ -1943,8 +1943,8 @@ void SemaHLSL::handlePackOffsetAttr(Decl *D, const 
ParsedAttr &AL) {
   // Check Component is valid for T.
   if (Component) {
     unsigned Size = getASTContext().getTypeSize(T);
-    if (IsAggregateTy || Size > 128) {
-      Diag(AL.getLoc(), diag::err_hlsl_packoffset_cross_reg_boundary);
+    if (IsAggregateTy) {
+      Diag(AL.getLoc(), diag::err_hlsl_invalid_register_or_packoffset);
----------------
hekota wrote:

> Should there be a test added that exercises the case of Size > 128?

This test case already exists in `packoffset-invalid.hlsl` on lines 61 and 63. 
:)

https://github.com/llvm/llvm-project/pull/173077
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to