<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylU0tvnDAQ_jVwGYFYE2D3wKHdqFIOObVqzgMewI3XXnnM0vz7Dmy2SareIiHAPL7nuPP6pf0xGQbDPJOcgc3JWAwQPUwxnjkpvyTqmxyjidPc5b0_ycLay-2SnYP_RX2U5QbCclOpet_k8DSRg4VgZoLjIz4TlLlSuYJE7ZfJ9BNMyICw-PCMwc9Ow-CFeiLoLboxi0a_QDePEGjEoI0bIamLjH5HCg6taHuQdaIOYByIss44jMYLqYh9j7ErE3VcpTDRhj94a_0igKu_4j4pbue6oBB8kMeAYZxP5CLMThxo0HNYFQjPWSJaedavEtW8F_QkchpIqq9Xdm1wdJ6j6bMrSia_n9DpzBpH2Y1C1GULBif4nCFnmwZOqvvV3jt5W1cTns_kGDrq8S3axVgLIzkKGElC_Sco0VUXMFgc16x80LR1jBdvxNlflQyS3u03mAjlO87hQcisocuHYnjys9VO_MbX-ZEqryZeezS8xs7G9TJbYrJh0MQmYGfXGjCulfxXAs_rdLzSp7ot9aE8YIpznHxoTxiisKC9oMucmDF9OgfbfmJiy7q5S6d2KFEhdiXtq7re01CrHTVVp3vq9YD1PrUoSXArBSdKOVquzuVeyko_r8C0qlByFIddqYQ836mqVGVXNb3adbviLrkr6ITG5itO7sOYhnaDlG3C8tIajvz2EpnN6Ig2waIwmmip_bAz1rifjNN-YRgEma-75_H7zyN8nKBtfNJNcbvJ_QMr-Wxz>53674</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy 13 on Windows fails with MSVC -external:W0 flag
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          martingalvan-nordic
      </td>
    </tr>
</table>

<pre>
    This issue is similar to https://github.com/llvm/llvm-project/issues/52687. When we use CMake 3.22.2 (which has a workaround for the clang-tidy bug regarding `-external:I`) in combination with clang-tidy 13, we see the following:

`error: argument unused during compilation: '-external:W0' [clang-diagnostic-unused-command-line-argument,-warnings-as-errors]`

This happens because CMake will generate a `-external:W0` flag in order to avoid diagnostics on external headers. I believe clang-tidy shouldn't issue a warning for this, since it's desirable that we avoid diagnostics on such headers.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylU81unDAQfhq4jECs2YXdA4c2UaUccmrVnAc8i9147ZXHLM3bd2CzTVLlVskyNtjz_Q190C_dD2MZLPNEMgPbk3UYIQUwKZ05q79k6puM0SYz9eUQTrJx7nJ7FOcYftGQZLsWYVnsVLNvS3gy5GEmmJjg7hGfCepSqVJBpvazsYMBgwwIc4jPGMPkNRyDQBuCwaEfi2T1C_TTCJFGjNr6EbKmKuh3oujRCbcH2WfqANaDMOutx2SDgArZ9zU2dabuFipMtNY_BufCLAUXfdV9Vt3mpqIYQ5TXgHGcTuQTTF4UaNBTXBgIzlksWnCWU5lq3xN6EjotZLuvV3RtcfSBkx2Ka5VCrp_Q68JZT8UNQtgVM0Yv9blALlYOnO3uF3nv6K1ZGTyfyTP0NOCbtbN1DkbyFDGRmPqPUcKrqeDocFy8ClHTmjFeghVlf1kyiHu3a2AI5RyX8CBgztLlQzBswuS0F73ptX8kyquI1xwtL7az9YP0lohsGTSxjdi7JQZMSySfUuBp6Y5X-Fx3tT7UB8yTTY66D8Eup5-s12FmOKJ1fA3_8fvPO_howKo-n6Lr_qOz66bd5qbbEW4bNezxsEW1rxtZtbJvm6FWathi7lAc404aIVPK03x1SNYSam47VSkZ1WFTq0Ztyo3a1arud-2gNv2m2mbbik4iplx4lCGOeexWSvIzsHx0lhO_fURmO3qiFU7q45RMiN0JY5Iw0F3QF14yt0O-0uhWGX8Ar8NV1A">