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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy: warn on unnecessary `NOLINT`
        </td>
    </tr>

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

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

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

<pre>
    It would be nice to warn if `NOLINT` is used on a line that doesn't actually trigger a warning (probably optionally, as when different people use different clang-tidy versions, it would trigger when using an older version that doesn't implement a given warning). This can easily come up as there are some warnings where the line where they arise is not the same location as the actual cause, and so if fixing an issue in the latter location it's easy to forget to remove the `NOLINT`. For precedent, similar idea to Rust's `#[expect]` as opposed to `#[allow]`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcU8tu6zgM_Rp5QzRw5EfihRftFAEKDDrAoD9Ay4ytgSwaopzUfz-Qk9z03pUtgeehQxJF7OCJWlW9qeo9wyWOHNqZDXufddyv7UeEKy-uh47AW0MQGa4YPNgzqDr__Ofvj88vVedgBRahHtgDgrOeII4YoWcSr_QhApq4oHMrxGCHgQLgRmT9AEof58Addm4FnqNlnwqV_gtQ4DqSh96ezxTIR5iJZ0dJ68elceiHl2j7FS4UxLKXhLYP8w_JjWuRpIke2PUUHoA_7dppdjQlcoTBXsg_3Crd7OBrtAIGPRCKdSsYngiWOfmNIwUCDASSLu-o7R0hhUK3dH4dV8BghVKAnuNWIDgRODaYorhz3vMDg4vQFo3vQTj14Wy_7y-yIguB9TcZjJHCk8dGpQ-SHK-pi2cOA8X0F2jiy83az5bu4MQB5kCGevIxaYqdrMMAtidMyH8XuZGqOle6UNUbfc9koqre00ygAM8zp7GI_KxB5_h6K9llfVv0TdFgRu2-bg6HuqnzJhvb47HuSn0sirw2xf6oO6r70tTVHnV1KBvKbKtzXexznee6zPNmV2nK9aE878uyNpXWqsxpQut2zl2mHYch2-Jp66Y-lJnDjpxsk6_1c36U1mkTQptAL90yiCpzZyXKkyba6Kj9gSlebzvBHhbvyZAIhvW3MLMluHaMcRZVvCp9Uvo02Dgu3c7wpPQpkd8_L3Pg_1KI-rQZFqVPm-f_AwAA__8GpzvM">