[PATCH] D30385: clang-format: Don't leave behind temp files in -i mode on Windows, PR26125, reloaded

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 07:47:32 PST 2017


FILE_SHARE_DELETE is for being able to request a file to be deleted when
it's closed, which is too late, right?

I didn't write the code in Path.inc, but from what I understand you can't
generally overwrite a file that's still open on Windows, and Path.inc tries
to work around this -- but the workaround apparently causes the system to
leak temp files.

rnk will know more about this :-)

On Mon, Feb 27, 2017 at 10:10 AM, Manuel Klimek via Phabricator <
reviews at reviews.llvm.org> wrote:

> klimek added a comment.
>
> Also, do we want to not call ReplaceFile in Path.inc on Win if it
> potentially leaves temp files lying around?
> Reading the code, it looks like we currently actually believe it may fail,
> and retry with MoveFileEx afterwards...
>
>
> https://reviews.llvm.org/D30385
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170227/0d4d0a22/attachment.html>


More information about the cfe-commits mailing list