<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57098>57098</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wvla should not fire for function array parameters
</td>
</tr>
<tr>
<th>Labels</th>
<td>
c2x,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AaronBallman
</td>
</tr>
</table>
<pre>
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2992.pdf was adopted into C2x and makes it more clear that VLA syntax in a function parameter list is not actually a VLA because the parameters are adjusted to be pointers, and so the parameter type is a pointer type, not a VLA type.
This means we should not issue a `-Wvla` warning for code like `void func(int n, int m[n]);` as in: https://godbolt.org/z/q9x6GxYM1.
Note, while this is a change for C2x, it's clarifying wording that has existed since VLAs were introduced, so I do not think this adjustment should only happen for C2x.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdU8FunDAQ_Rq4WEHgBXY5cNgkSlWp7alq1eNgD-DE2NQ22d1-fcfepEkq7TJgz_i9eW88WHnp5xBWn-2OGX-g3-l0KuyK5sYHWVg30dJjEBUFLziPCVNVX_PoKa3wFAzvOl6scmQn8AykXQNKpkyw7I6fGRjJFnhCz1Rgi3XIhEZwLMwQ2I8vR-YvJsCZChiwcTMiKGvYCg4WDOiYVj4w5ZmxgYEIG2h9ocxYOaCAzSMdhW8FRIEwQD5uPvIgFgPtWuJDexm_S4S8_VjEwmXFiAKvqWklpifcBBdXiqy8z8rj9fl9pooFwXh2QuZnu2mZ8pX3G3FgWVve_HzWQJHEcUaZiY3WMWElUmNPGDOerZKp8YwfCJqZiBpflqy5NVlzn_Eu293GM0hfZcgt9tG2ycrB6vDi2B_6_-7O7afzr6_VB77fbEgtnWalo2rEPrUsZjATJmbkWIIPGd97cgqcGi-R9sk6GWOybSYieFZJYK-MwKhPFIGUJ-bOyk2gjAeR0J-ZtEkVAjRPV9irPQtSly-yWUO2zrDS9L0SKXLsq7Yted02TZvLfie7XQd5UEFjn4R9L_qo3LWHf0MEzsHl3WTkm9P_TfykwrwNhbALfWj9_BpuVmcfUZAMD8nMOOjNvuwO-dzX5ThI3pWHbuBjPWKL4jBW-0OLNQKO-1zDgNr3ZF_GuYiK8qhF_NCkNIFLBZOxPqh4gzh5nKuel5yXh6qqul3T8OKw50JCvSvHpqtgGLK6xAWULiK9aHXu-sR02CZPm_Ge-LdN8F5NBjGxoPNhC7N1_RGcNbd0hxYweeqsT239Bc_pV00">