<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62097>62097</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Crash in clang::ASTContext::getTypeInfo after initializing an array with a value of unknown type
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alexhenrie
</td>
</tr>
</table>
<pre>
clang-tidy crashes while processing [nsembed.c](https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/mshtml/nsembed.c) from Wine. This is the smallest example I could make that reproduces the crash:
```c
undefined1 scalar;
int array1[] = {scalar};
struct {
int array2[sizeof(array1)];
};
```
clang-tidy only crashes on this code about 50% of the time, so if it works for you, try it several times.
```
$ clang-tidy --version
LLVM (http://llvm.org/):
LLVM version 15.0.7
Optimized build.
Default target: x86_64-pc-linux-gnu
Host CPU: skylake
```
[backtrace.txt](https://github.com/llvm/llvm-project/files/11213660/backtrace.txt)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE-P-zQQ_TTuZdQocf60OeSw3ariJy0CiQWOyLEnjaljB3uybffTIyfttiBAQqpqjf384nnzZkQI-mgRG1buWLlfiYl65xth8NKj9RpXrVPXRhphj2vS6grSi9BjgHOvDcLoncQQtD0CK3c24NCiSiQr94xve6IxsPyF8QPjh6MmI9rkrC32fyTOHxk_xOCxrBk_tMa1jB8GEQg94wdlTIhx6GkwjB8en-A1dN4N8Ku2mMB7rwPoANQjhEEYg4EAL2IYDcI3kG4yCgZxQqBeEHgcvVOTxOXGnFR8abpn6f2_SpefXOLJKuy0RZVBkMIIz_LdM15bAuG9uGaLlsDyPbDN7gbe7P-GD-QnSRGxxAAAXxyclbugP9F1jG9vrLyOsn6RPBPen_rM_1QzZ82jcM4CRbGkUwiidRNBmTJegutmLUgPyPgrBAe6A01wdv4UoHMerm6KJ-SvcT_gB3ph5gsh-UfpbiEv4Ok16_UH-qCdXU7f3n75Hm5u-TKLMR_DzSMx73tlYAbfrkNWJmmyuav3w0h60J-ooJ20Ucl9f4-dmAwBCX9EYvkLXLbVb1WxHuXaaDtd1kc73cHfuUDw-uPPERZOVyNO-B8Ss3LXCnkiLyQmdKF_sX0_tYl0wy2t27IevfsdJTF-6LTBaPIs41leVWlsg7_Q8nqlmlzVeS1W2GTVNsuzKq-zVd9s87pNFc-3WBSbWopWKpWnW5lLVSjsNivd8JTnaZHxrMrqMkuqThZtV-VFmWaV6lJWpDgIbZK75isdwoRNxdN6szKiRRPm8cC5xTPMh4zzOC18M2fSTsfAitToQOHBQprMPFcepY9d8RptCNoujogy5S8vP72_Okt4oSU-Ir1fR_xmOweiI_SgrSYtjP6Mk0bYpUngrKkHAR_CTBjtO9mTdWcLdB1xNXnT_O9SzNnFWszZ_xkAAP__yQGWbg">