<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/116430>116430</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Invalid VLA is not rejected in constant evaluation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Sirraide
      </td>
    </tr>
</table>

<pre>
    With `-std=c++23`, this compiles, even though it really shouldn’t (https://godbolt.org/z/xKjPEP34s):
```c++
consteval int foo(int n) {
    int x[n];
    return 12;
}

static_assert(foo(-1));
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUk2L2zAQ_TXji0iwRrZjHXxINmso7WGh0B6LLCm2FkUK0jjs9tcXeUNbFoQ0zNd7M08qZzcHawdoT9CeK7XSEtPw3aWknLHVFM378NPRwqCrd5kMiLMGPAGeUEBXAz4xWlxmOl5vzttcHPZuA6MlrvPCHLFklffvLC9x9SbAM0Jfg5TEAPuF6JZBHAFHwHGOZoqe9jHNgONvwPHt6-vL84toMqAsafUZ6mPB3c6DyYdXx5DJ3pVnLhC7xAjYFysASgaHRxZjbIu_QXsK0J5B_BdIltYUGMe_XjicH8Z2Z1Lk9C-Vs00E2H-g7HhhVwiePhGszCCMFFJVduAHwTspZd9Xy1BPtr0Io6f6oBshdMulkpJz0zdW6UNfuQFrbDjnLZdNh_2-OZiWt13b152-tFMDTW2vyvm99_dr2Vjlcl7twHnXiLryarI-b7Iiaq_CDOJ4STGQDQYQi9hpKLW7aZ0zNLV3mfK_buTIb9_iaStuz-xLuCvvDPvx7chcZiEWaV-tJmuYC2zbvwrEigarIhdDtSY_fJLY0bJOex2vgGMBezy7W4qlF-C4zZEBx8co9wH_BAAA__8Jr8oX">