[PATCH] D30385: clang-format: Don't leave behind temp files in -i mode on Windows, PR26125, reloaded
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 13:22:55 PST 2017
thakis added inline comments.
================
Comment at: lib/Rewrite/Rewriter.cpp:455
I->second.write(File.getStream());
+ prewrite(I->first);
}
----------------
amccarth wrote:
> I'm not familiar with the structure of this code, but it seems odd to me that the callback is called `prewrite` when it happens _after_ the write.
obsolete now, but while it's true that it's called after the write to the temp file, it's called before the temp file is moved to the final location -- and for the client code of this function, the temp file is an implementation detail it doesn't know about, so it's really called before "the" write.
https://reviews.llvm.org/D30385
More information about the cfe-commits
mailing list