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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Assertion `hasAggregateEvaluationKind(E->getType()) && "Invalid argument!"' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Reproducer:
https://godbolt.org/z/5nz1o6GMz
```c
#include <stdarg.h>

void foo (int s, ...)
{
  va_list ap;
  va_start (ap, s);
 int e = va_arg (ap, int()) ();
  va_end (ap);
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUsGO2yAQ_ZrxBcXCg7Hjgw_eTVxVVS9V7xUGgmmJsQC72nx9xW62Wa2ExDDz3sB7g4jRmkXrHvgT8FMhtjT70P85iBD831hMXr30P_QavNqkDsAGoMOc0hpziCPgaLyavEulDwZwvAGOfLlVvvny_QZ0gIa-LZkPyOwi3aY0AfYckxLBlDOwc67RYfdWkYv3BPBol0Qi4DMpyxKwy4D2CehAyC5-ORsTESuw_5mYREiZJ9ZMipnyVs2N8nWnDBPBPEB2SYDHjMSO3KNHR72od-g9De3po6BC9Ux1rBOF7qu2bmveHJu2mHtx4bSeLppPSjaM8e6CfKo6yWiFE6eqsD1S5JRXLa3rirYlZ1hNnWBSdrJGpFBTfRXWlc7t12xsYWPcdF_VlNVd4cSkXXwfWegz6jBtJkJNszXxwUs2udfhSicWA_xEhhh1SNYvBBo6izgYE7QRSZ934TaRK9_sogCP5wOws9Hp58uqPxrVADYEEL8uu3BWERHMdtXZzAoQAVtyEdZpVRZbcP2nz2LTvE2l9FfAMb_yvh3W4H9rmQDHV6kRcLyr3Xv8FwAA__-iZ8cp">