================
@@ -195,7 +195,8 @@ bool HLSLBufferLayoutBuilder::layoutField(const FieldDecl 
*FD,
     // Unwrap array to find the element type and get combined array size.
     QualType Ty = FieldTy;
     while (Ty->isConstantArrayType()) {
-      const ConstantArrayType *ArrayTy = cast<ConstantArrayType>(Ty);
+      const ConstantArrayType *ArrayTy =
+          cast<ConstantArrayType>(Ty.getDesugaredType(CGM.getContext()));
----------------
hekota wrote:

```suggestion
          cast<ConstantArrayType>(Ty->getUnqualifiedDesugaredType());

```

https://github.com/llvm/llvm-project/pull/134683
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to