<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/134668>134668</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL] Cbuffer declaration with array typedef crashes
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
spall
</td>
</tr>
</table>
<pre>
This code should compile, and if you use 'uint32_t4' directly in the cbuffer instead of the typedef it does.
https://godbolt.org/z/4nx4zsMdf
The type needs to be desugared before being cast to a ConstantArrayType.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUc2K2zAQfhr5MmyQx3KcHHxIdzE9bE_NvcjWOFZRJKMZbet9-uIQWuhJIL75fi2zv0WiXrVfVPtW2SJLyj2vNoRqTG7rr4tnmJIj4CWV4GBK99UHUvgKNjrwM2ypQGEChV3xURr8IUZhB85nmiRs4CPIQjCNZZ4pg48sZB2k-fEt20qOZvACLhEflL4sIiur5qJwUDjckhtTkEPKN4XDp8LBxN_mk7-5WemL0pfrkwUikWOQBCOBIy43m8nBSHPKBCP5eIPJsuwIC68pstgol5ztdt1W2pUr1zfu3JxtRX3dGaOb0xmxWnoiQq2p7upZH9F0Tnf6aE6EbhzpPGHle9TYaqO7uq1brA-no2nqs25mo6kl0yqj6W59OITwcd_DVJ65UF835ng8VcGOFPgxBOLX9-_vCnGfJPc7_mUsN1ZGB8_C_xjES3iM9zho3-D12bGjKdhsxacIv7wsYPeUf7uesuWFuCo59P-V7WUp42FKd4XDrvN8XtacftIkCoeHbVY4PJ1_9PgnAAD__wosvfM">