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

    <tr>
        <th>Summary</th>
        <td>
            clang-scan-deps should be aware of the output file
        </td>
    </tr>

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

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

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

<pre>
    `clang-scan-deps` currently writes to `stdout`. [CMake issue #25429](https://gitlab.kitware.com/cmake/cmake/-/issues/25429) was filed because the naïve `> output` solution unconditionally updates the output file even if scanning fails. If it was a known output, a failed scan could reliably delete the output file so that `make` and `ninja` understand the state properly.

Cc: @ChuanqiXu9 @iains @Bigcheese 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkks9u4zgMxp9GvhAxZPlPooMPaboB9rD3vdIWbatRJI9FNcjbD-R2MEV7sUSD_PiR-mGMdvZEvWhfRPtaYOIlbP0deYmcpmII5tmLTo4O_XyII_qDoTWKTsKYto08uyc8NssUgQOITkY2IbHoZAmifbn8hzcCG2MiEKpWbaO0aF-FOi3MaxT1WairUNfZssOhvFl-4EblGO5CXcc73ujLeRDquktFoa4fUkrDAyNM1pGBgUZMkYAXAo_iUovz9Z2yKVH_AyHxuhuDGFxiGzwkPwZvbL6jc09Iq8F9koU-03dloHfyYCfI83vrZ5jQuljCvxNY3g0g3Hx4-D9N1AVwTyKzF8EYkjOwkbM4uCcYcsT0o08MwAtydryP3ElAb3LorX_DHCdvaIucf-fqyMgE6xZW2tyzFPJVyPPH9zKK-gyikZclof9l_086Rxatj_nyYudxIYoEhelro2uNBfXVUcrmpLvuWCz9oCfEQXed1q2qupq604SoSbZaadVOhe2VVHVVKVk1VaOOpTyOjaka3VanRp1wEo2kO1pXOvd-L8M2F_sD9kd1OraFw4Fc3NlTytPjAxShVEZx63PNYUhzFI10NnL8q8KWHfXfqIS47GseCDBjBGH6vuIiba7_gd6Shk_kcoPP47Bu4Y1G_grdbvt3AAAA__9-YQvc">