<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59570>59570</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wvla warning twice for VM type at sizeof
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Origami404
</td>
</tr>
</table>
<pre>
Reproduce code:
```c
int func(int n) {
return sizeof(int [n]);
}
```
[godbolt here](https://godbolt.org/z/MaKh57n4G).
Clang issue a VLA usage twice instead of once.
I am currently working on VLA and VM type checking in clang and I am going to solve this bug by myself. I guess this may be caused by evaling runtime sizeof expressions required to call `Sema::BuildArrayType` twice.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUl1v2zgQ_DXUyyIGRUmU9aAH-wwdgrvggGuRPvNjLbGlSJcfTpVfX0h22iaAoK_ZmVnOrojRjA6xJ82RNKdC5DT50P8XzChmU9O6kF4v_f94CV5nhaC8RlIdCD0R-nbn9Hap27dxCc7ZKcL266sjrAPSHm8gAEDAlIODaF7Rn-9VpDk60pwI60h1LyXt6YPBO9fmOHotvU0wYcCNu59SusS1PTYQNtzxnQ8jYcMrYcOT-GdqWlf_TVi3-1PtLyvcCCbGjCDg-d8D5ChGhPRiFIJxMaHQ4M_gncJ3zEcQM6gcArpkF3jx4ZtxI3i3qQin4fkJ0nJBUBOqDTMO1Oa3oht_9Ov_5CF6e0VIk4kg8whygXmJaM87eIQxY4w3bBYLSAQlckS9VuFV2FUiZJfMjPdsAX9cAsZovIsQ8Hs2AfVqo4S1QDj9hLNY46oOx2ysPoQgls_LBQmnt6PvoNB9pbuqEwX2JW_LijVtw4upV7LmUtZ1WeuK8o4x5FrvaVtpyfmZY2F6RhkrWbmnJe1KvkMsdVdyLjuJlHWM1BRnYezO2uu8TqnYBtA3XdPSwgqJNr4tZujXogeZx0hqak1M8TctmWSxf_hytQJeRHBbmNvkzj78yl-kt1iKHGz_YVdMmrLcKT8TNqzC98fDJfivqBJhw9ZcJGzY-vsZAAD__20KA0U">