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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy misc-unused-parameters breaks attributes on parameters
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          emaxx-google
      </td>
    </tr>
</table>

<pre>
    If a parameter has an attribute spelled after it, then after `misc-unused-parameters` comments out the parameter name the attribute becomes wrongly applied to the type instead:

```c++
// before:
int& f(int& x [[clang::lifetimebound]]) {
}

// after clang-tidy:
int& f(int& /*x*/ [[clang::lifetimebound]]) {
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycUsuumzwYfBqzsYh8CQYWXuT8UaT_MQz-ALe-IPvjNHn7CpI2Z9FuKo0EMnPRmDGluDkCaNJ8kOZamQ2XlDUEc7_Xc0qzh2pI9qH_n6ihq8kmAEKmiynURGoQsxs2BFpW8B4sNdP-2SER_1FcIL4OiGLBlbHe4lbA1r-NClGMjikEiFho2nAXfcmJJsBx9E4aYEwBCv2RU5z9g5p19Q4sxXQQ8bECdbEgGEvkhbADij0xEvGxg12IuBFxowNMKcOT6CISoehERPd6vdPjXj5Gb-K8k-TFuwnQBRjSFi1prjtET0l7mLbXV-DT_Vn-UNfo7ONvOQf9cidiF_5b5q-GldXS9rI3FWjeSiXbXvK-WjRr5KS6duzsyFgD_Gyha63ppeLsrGxfOS2YaBhnnZCy4f2J28Eqbpg6W2XbriNnBsE4f_L-M5xSnitXygaaC8F7XnkzgC_HkoT40lmIfVlZ76p62OZCzsy7guXtgw496LeG_nksdMhgvpf3GApN8b2WUm3Z6wVxLfu9Hb9gdrhsw2lMgYjbnvd61GtO32BEIm5HiULE7dXjU4ufAQAA__9AaPiW">