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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy not respecting -Wno-builtin-macro-redefined with gnu++20
        </td>
    </tr>

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

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

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

<pre>
    If clang-tidy is set to use the gnu++20 language standard (does not work with regular c++ or lower versions of gnu++) then the -Wno-builtin-macro-redefined CDB flag is not respected, even if the macro is redefined as a compilation flag itself. Note that this is not an issue with the regular compiler as it does not throw that error. Minimal reproducer:
`touch test.cc && llvm-project/build/bin/clang-tidy test.cc -- -std=gnu++20 -D__TIME__="AAA" -Wno-builtin-macro-redefined`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9UUuP2yAQ_jX4MrJFcBzbBx-ym660h-2pUo8RhrFNSyACnGj_fcdOuslpJcRDzHyv6b3-7N4HUFa6MU9Gf4KJEDFB8jBHhDQhjG5m4oWW4LDUzXJEiEk6LYMGJhrtMYLzCa4-_IWrSRMEHGcrA6hbJ_gA1l8xwAVDNN5F8MMDmIl2YXIrXf7b-byfjU3G5Sepgs8DahyMQw2vhxcYrBwXmQtjwHhGlVAz8Qp4IQgzrChr41L16JURJCh_OhsrE2m4A6WIdijgp0-LXUnWJ2q740sCjHHGm6sF-MvZCkSOCNYk-MogTcFfb0AYgg8FfBhnTtJS5zl4PSsMrNwzfmB8z3Y8-VkRMsZUKEVp7miBtZdTTtV_yBsTb0saejmNo_1pWP_b8hzymDQrD8_Dyg_H46_3jx_HI30wIfb7Pe3fBkyCMuw2u6qpq6YRbaa7UrdlK7NkksXuifspfuPG78e2pvckLZuD7aaUznGJQrzRGqlk7guKlR6L__vxFMM6iUiXalfzNps61bSK6w3f8KZqhOY1l6KsN2Upt1ptxS6zskcbO1YRrXB4vQ2T7qw6ZKYTXAhei2qzpVtbtLISm16Jcmhrte1btuV4ksYWi47ChzEL3Sqpn8dIn9bEFB-fMkYzOsSVjvDlnCYful4GZUS2Mner8n8_0iVW">