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

    <tr>
        <th>Summary</th>
        <td>
            [clang-include-cleaner] [clang-tidy]: Add option to only add includes
        </td>
    </tr>

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

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

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

<pre>
    The include cleaner check is useful, though there are many false positives where removing files would break the build.
When used in clangd via vs code, there is an option to 'Add missing includes', which adds all headers that are used in the file, though are indirectly included.

It would be helpful if the clang-tidy check would allow for only reporting about 'missing includes', as this would allow for automatic fixing without breaking the compilation.
It also makes it easier to do a gradual roll-out of this check, as you first want to do several commits adding all the missing includes to the different .cpp and .h files. After that, you can more safely clean up .h files, without having to worry about the .cpp and .h files that might rely on indirect including these files.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0lM-O87YOxZ9G3hAxHDmefF54kXsHAdp10a5pibbYkSVDf5Lm7QvZnpmiH7oKIIU8v3NEGmPk2RENovuf6N4rzMn4MPz6-20lV41ev4bfDAE7ZbMmUJbQUQBlSH0AR8iRpmyF_D8k4_NsIBkKBBgIFnQvmNBGgtVHTvygCM_tOtDiH-xmmNiWQ5-thjEQfpR6GDNbXYvm9ochVyQ0sANl0c0aHozwiKC8pl22NOQI6MCvib2D5EHI601rWDjGInPgRyGvpeZpWBlArSOgtWAINYUIyWDayD8VC0sh_Ie9cs1OcyCV7Ouz8QYrmtsv6dMLgSG7TtkCT1ufjf6UWL-O8PY_orX-CZMP4J19QaDVh1SQcfQ5FR__4QELL8ef2mBOfsHECib-q9Q9uaCnPd5ysNH4ZWWLJa5650YbPSz4QRE4AWFkCiVJ7QFhDqgzWgje2lNp5qddfbNy4Lx8holDTPBEl47aSA8KaIvgwimW0Dd31m4c_zZXqsq55mmiQC5BrdYV0GmozT4tNdymVNgMpqJcZBU6WHwgiDiRfe1jCnn9Ktpe_QjC4DZ6ycPTh_A6ki6qP2ntI7HwbBKE0ti7r9c_mI9EIx10lR5a3bc9VjScr5fm3L31bV-ZYWpa2aseL9eRzt0Ve8L-7ce1V-0bNqo9VzzIRnaNlOfzW9e1fS3HTsur7i5StQ21vbg0tCDb2trHUvswVxxjpuEsf5z7vrI4ko3bIkv5PW5CyrLYYShVpzHPUVwayzHF7z6Jk90-AXvZ8RqnY9tF9w5fd1vL7l20Nygb9r1y2_yi1l9vWeVgB5PSGkV7E_Iu5H3mZPJYK78IeS_qx89pDf5PUknI-2YpCnk_XD0G-XcAAAD__2KemxA">