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

    <tr>
        <th>Summary</th>
        <td>
            Unknown type attributes are diagnosed twice with `[[]]` spelling
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            c++11,
            c2x,
            clang:diagnostics,
            confirmed
      </td>
    </tr>

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

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

<pre>
    Consider:
```
void func(void) {
  int [[attr]] i;
  (void)sizeof(int [[attr]]);
}
```
This generates four diagnostics, two for each unknown attribute. See https://godbolt.org/z/r6eGx1W6E for an example. The same does not happen for declaration attributes or statement attributes, and it does not happen for unknown type attributes spelled with `__attribute__`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1UtuOmzAQ_RrzMioCh0t44CHZdPsB3aqPkcEDuDU2ss0mu1_fgWyyaZVKg8yZ4zlz8TRWvtVP1ngl0bHNjiUHluxYkXzYCl-tktDNpmV8u_wzXgEr9xcSQJkALN-TiRAcyw9koNjmduEzzKt3tB3hRzHE34JYeXhYysugPPRo0ImAHjo7O5BK9Mb6oFrP-BOEkyW_AxTtALP5bezJwJJFNXPAGL4jwhDC5Jd2-TNZb2VjdYit6wm90-cK_HZOfxZfVyVhAM9inDRFvwwIXowI0lJ-YwMMYprQrBcltlpQZcreZfRAjA9U74jU9ad_KVYYCSo8FLuWHt4mvFfzE2qNEk4qDECDOR5v5PFIOI5kvZHVphJRUEFj_eM_QsLhdXYkF06qxZvo5W0-3qVILkmV6aPZ6fqf6VHI3MStHQlo_Xo9vkzO_sI2EFTez0u_z3m2TctoqLNyWzRVUeZVhzIvmiItq6xrSp40HRaFjLRoUPt6qYHz3lraP-V8gFWJXMvs6KCNpAv7NL1z8fMd0ML0VOlfK3IjrSHREeXiyg-RqnnCeZIl2zTfJDmPy05kWZpUQmRt0lSSZQmOQul4aW_ZlsjVa6fN3HsitfLBf5LCe9UbxPoyyUjMYbCu3glnzV5oPQoTrf3U61j-AAETH4I">