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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] NOLINT is not working in certain cases to suppress clang-diagnostic-* messages
        </td>
    </tr>

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

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

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

<pre>
    Hi,

We find that it's possible to suppress compiler warnings using `NOLINT(clang-diagnostic-warning-name)` in clang-tidy. However, the NOLINT mechanism stops working in the following example:

https://godbolt.org/z/r3f7feoY4

To make it work, I can:
* Remove `-Werror` from the compilation command.
* Not disable the clang static analyzer checks, i.e. remove the `-clang-analyzer-*` part from `checks`.

This seems very strange, why does it happen? 
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckkFvoz4QxT-NuYyCyEBCeuCQfyvUSn91pVWlao8DnoC3xkYeJ9n0068cUrXbk8F6M2_e-EciZnDMjdr8pzYPGR3j6EPTU7BeBrInfp-zzutL82gU3qtir4r9K8PBOA1xpAgmKqwFZi9iOssQPchxngOLQO-n2VgOcKbgjBsEjmLcAGpbPP_4_-n5ReGut-SGlTY0OC_R9KubduVoYoV3aluAcbDIotGXHB79mU8cFN5DHBmWVjBxP5IzMoFEPwucfXhLZsZdVQdvrT-nC_5D02xZlfslzhjjLOkPW4Xt4HXnbcx9GBS27wrbUB7qA_tf1SJ_8TDRG4OJV4s0xRP05G79cA8_efInTilXrxyCDynDIfjpOsiyFIrGu_Q9kdP5rfDZR9BG6LrHJE2hQSJF0wM5spd3DtCP3L9J8jU55xAWt6RPjsuiPsQrhfvkPlOIywhqW9wabIv8lmg0AsI8CZw4XEBiIDdwcjiPF9CeJaUdaZ7ZqbKFTDelvivvKONmXVe4W2NdYDY2daV3Xdlhh_VmW_LmUOu-ZtxhucU1ap2ZBgvcFCVW66LcIeZ6XaOud8xVX9flulJVwRMZm1t7mtIjZEbkyM26xLrYZpY6tnKlFfGTCYWY6A1Nqlp1x0FUVVgjUT77RBPtlfMvZZuHD3qMgPPxKzQ9h0jpJGH5F-vvyKa3m1iEBpbsGGzzDSkTx2OX935S2KZ5bsdqDv4391Fhew0pCttbzlODfwMAAP__LSwu5w">