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

    <tr>
        <th>Summary</th>
        <td>
            Frontend crash when using an enum of "class" 
        </td>
    </tr>

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

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

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

<pre>
    This crashes:

`void bar() {
        using enum class;
}`

when built with: 

`clang++ enum-crash.cpp -o - -S -std=c++20`

I know its silly code, and not actually what I meant to write, but ideally we'd not crash. We do emit the diagnosis first though:

`enum-crash.cpp:5:18: error: expected identifier or '{'
        using enum class;
`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1Uk2P3CAM_TXkYmVEIJ8HDt2OVtpzK_VMCEnYMhAB2en--zqko7ZbNSJ82X7v2Wb007v4upoIKsi46kj4J0KvhD7mlr55M8EoA2E9YQOQ7unhMOzRuAW022-grIwY_LB1V4z8E-i-agfjbmyCu0kr0sAHHkRwC2FPODJkmRVd1LZB6aGE8guUMU2EX9XpxegHjhf47vwdTIoQjbXvoPykCfsM0k3gfAKp0i4Pw32VCV7gpqVLkDzcg0nZc9wTmEmfTnjTnYGnFPimYfKgbwaDVtwbuTgfsXizCfG48_uy_lvBv7NBe4N_1R810CH4kDc_Nq2Sng52l8xsdAAfABUcBcc5g8Gv7_-Fb2mhRdW2Fe9aXtNiEnwa-CCLZJLV4jl4lzSWI8uB3JUTTLoTz89Iyk5UxqDYgxVrSlt-GewZx4L928eL8jc8WPv2WMot-FdMAo8mxh3fEntuOl53xSqmQVEu27ZtmqGtB910que8GgeqZqaaubBy1DYK0mCyzGns4gGBe9JcCyMYZYz2rGYVa2p6matOM87HYeSV7Pqe1FTfpLGXQ8fFh6UIIksa9yWi0ZqY4m8j5mYWp3WmQ3y5Y-uCUN5vOmxFphZZ-k-tifOT">