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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Accepts invalid auto on a declaration of class
        </td>
    </tr>

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

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

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

<pre>
    ```
auto class X1 { } ;
```
See Compiler Explorer: [https://godbolt.org/z/3WheK64E3](https://godbolt.org/z/3WheK64E3)
auto can only be specified for variables or function declarations.It is rejected by GCC, but accepted by Clang.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkcuK3DwQhZ-mvCnGyJIv7YUWfRn__GQ5iyTLsly2FdSWkeQmk6cP7u6QYVYBgYTqFHXqfBSjnRZmDdUJqktGW5p90N83M9MyvW1Z74d3DbV4HnEBcaQteTSOYsRvBUJzQmguCOr0KH9SvzHj2V9X6zjg68_V-cAB1BGhOs0prRHUEWQHspv80HuXch8mkN0vkJ36OvOXunxVUF1AHv5dLtuPVmlBv7h37BnjysaOlgccfcAbBUu944g-4LgtJlm_4MDGUaD9HfP_E9qIgX-wSTxg_47_nc8gz9hvCckYXp_fZ0fLlD_GZoNWQ6taylgXjRKNOBR1nc26ISOb1hgpSTZ1bQZZiarkQ9tQUx3aMbNaClkWhSj3FlHnShVlPZAUtajqoh-hFHwl63Lnbtd998zGuLEuirKpVOaoZxf_4Ax6V7302xShFM7GFP_2JZvcHfzdOVQXPN7XiWiXGzk74D09vyB9jAT9-ICfbcHpT0hsmrc-N_4KstsHPa-XNfg9QJDd3W0E2T0N37T8HQAA__9dEsf7">