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

    <tr>
        <th>Summary</th>
        <td>
            Clang frontend C++ crash on `auto` in non-static struct member
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    To quickly reproduce: https://gcc.godbolt.org/z/G79ThqzWE (assertion-trunk)

```cpp
struct Tournament {
  int id{0}; // remove this line and it no longer crashes
 auto x = 1;
};

int main() {
  Tournament s(0);
}
```

Compiling the above code crashes clang `clang++ -x c++ -std=c++20 `, crashes locally using clang-17.0 (a10019a) (requires c++20 or above), also on trunk with assertion (see godbolt link)

Note that removing `int id{0};` inside the struct stops the crash.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcU8lu4zgQ_ZrSpWCDIm0tBx1iezy3OQWYM0VVJHYo0uGS7esblJS0O4BhUaT46i1VMgQ9WqIOjic4XgqZ4uR81_sUpQnyVY5U9G746B4dviStns0Herp5NyRFIB5wivEWQDwAvwK_jkrtRzf0zsS98yPw6yfw6791-zi9fP7_DwJvZAjko3Z2F32yz8BbYBdgD9t_xdafut3WnRB9UhEfXfJWzmQjQn1ajxC1jagHqE8M6guIE6400NPsXgnjpAMabQmlHVBHtA6NsyN5VF6GicIGJFN0-I4gLliC2OBXyHt2udwstQXeAG_vidzRC8AblmXd4_wt7h7z7OabNtqOGCdC2Wfeyg30xRCVkXbEbEleAD8BP-HuHdXXMsQBxGV75Sx_Cvz8fd84JY35wBRykQVkV9Z7toRRMla2chHDG08vSftc8hvL-ZVS1sPPKE1w6Cwu0eGbjhN-55kRAhFu-Wfff6b7n4s5FBnXgPSq62eIUDHUNuiBFku2BgjR3cKysQjbF0Mnhla0sqCurJqq4uJYH4qpq_lT2fStGPqBjq1q2rZisn-qm2N1YE1VFbrjjAtWlYJxwY-HfdOqXihR9iQPTV1KODCapTZ7Y17n3MeFDiFRVwleN4WRPZmwDAznlt5wOQTO8_z4Lt_Z9WkMcGBGhxj-oEQdDXXnJc8n72wkO-B5i3FRlb2FiuV2XF1A6-wuRBm1-jJiprknXyRvuh_Dp-OU-r1yM_BrLro9djfvfpGKwK8L1QD8ukj5HQAA___-EDfM">