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

    <tr>
        <th>Summary</th>
        <td>
            using negative regular expressions with {run-}clang-tidy
        </td>
    </tr>

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

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

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

<pre>
    https://github.com/llvm/llvm-project/pull/82416#issuecomment-1955055082 mentioned that filter options with regular expression support can use negative expressions as exclude patterns.

I thought one of the limitations of `llvm::RegEx` is that it doesn't support negative expressions so I wonder how that should work.

I want to use this with `-source-filter` for `run-clang-tidy` as well as `bugprone-unused-return-value.CheckFunctions`.

CC @carlosgalvezp @HerrCai0907
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8ty4zgM_BrqgpKLpl7WQQfHWdfmun9AUZDEDU2qCNBK9uu3JE8mmcdlLkIJIInuRkMT2ckjdqJ6EtVzphPPIXajjbjqO2Z9GN67mXkhUZyFugp1nSzPqT-YcBPq6tz9I-RLDP-iYaGuS3JOqOtJlcdaqMISJTThdkPP-bGtKllV8qRg-7fB4wA8a4bROsYIYdmSBKvlGSJOyekI-LZEJLLBA6VlCZHBaA-JEDxOmu0dv5wh0AT4ZlwaEBbNjNHTQchnIc-P7wvwHNI0MwSPEEbgGcHZm2X96B5GELXc6RVnUZz_wemvN1FLsPRAaxmGgOSFavg7pt9ioQAvsAY_YIQ5rI_rNIfkBlhDfP0J2Ko9A4edG8_2mxCiljmFFA3mD502LGOIWyEmnxun_ZSzHd63giZY0bktilr2aVpi8JgnnwiHPCKn6PO7dgkPlxnN6zV5s_MWtfwBzuUCopRGRxdo0u6O_y1b4m-M8aKtbGWTDV0xtEWrM-yOzVG2qmiLJpu7fmxRqrIszahGfWx70zbYjGOrtJFVoTPbKalKWSgpT8Wpag7FsW9G1NVJF6VRqhalxJu27rCN4RDilO1O6k5VK6vM6R4d7cZV6gt9pTYjx273ZJ8mEqV0lpg-n2HLDrtE1k-fI_vVah_SN0-bwqJ5_uySpej-fC92-LRtxsbg_wAAAP__zZ4qXg">