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

    <tr>
        <th>Summary</th>
        <td>
            Does Clang's diagnostic message for alignas need to be improved?
        </td>
    </tr>

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

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

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

<pre>
    [godbolt](https://godbolt.org/z/osxc3fGM3)

% cat main.cpp
alignas(void) class Bar {};

% ../build/debug/bin/clang++ ./main.cpp -std=c++11
./main.cpp:1:9: error: invalid application of 'alignof' to an incomplete type 'void'
alignas(void) class Bar {};
       ~^~~~~
./main.cpp:1:20: error: misplaced attributes; expected attributes here
alignas(void) class Bar {};
~~~~~~~            ^
                   alignas
2 errors generated.

Should 'alignof' in the first diagnostic message be replaced with 'alignas'? Although alignas equivalent to alignas(alignof(type)).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU82SoyAQfhq8dI2lGIMePCSbZE972icAbSNTRFzAZLJPv60m2czs7GEoRKDp_r7-U7a5VizfHm2jrAks3zFedCEMnmUbxg80b6LYuiOdftNn_Vudtd9_ZIyXLNmxZHNbeQ61DHCSuo_rYVhupdHHXnqye7a6IRWojfQettIBE1smdizbfjQTx4SjRm1I4dCgGidspXtaSbun05YmTK_uaPDiQ8OyXb3I0nSx9vyEfErpK-kDdM66aaP7M1FsQA6D0URf2x5sC4yLmbltaQfBguzpaW1Pg8GAEK4DTm8Wn8SXXYVlMLFn-X5aH_N_rHnyjvZJ-8HIGol4CE6rMSDlbAv4NmAd3l1Dhw6_ngyx_3fC05iIP_vyPO44s5wvrD0csUcniVz8nO-fnR1N8yHguofQIbTa-QCNlnTvg67hhN7LI4JCcHgLwEWH7qE-OSdYdoCNCWT42N25AP4aNaUa-zCn8xGJB2oxJXWqaV7GUVNlTZmVMgo6GKx2luL4bSk94T9j1Fr3gOqRaBEIsdSnwdkzUmUeotGZ6kNzEfVRxVRWdDDmfP-9kNIr5ZGO2vuRUssPeZ6KPOqqRiohVLFO0rIsSpnXWcpVKlGupZCIRWSkQuOntmac93iB2QTtqb0jXfGE82TFi7RMslUaN2sKQc4zJWQrEhRslSCVnoknHlPXR66aKVETehIa7YP_K6TqIZ8RZziyL0cKu6user1cu2hGrmbmfwDcdFg6">