klimek added inline comments.
================ Comment at: include/clang/Rewrite/Core/Rewriter.h:188-197 + /// prewrite(FID) is called after all changes to FID have been written to a + /// temporary file, but before that temporary file is moved into FID's + /// location. Windows's ReplaceFileW(to, from) internally creates (another) + /// temporary file and swaps the data streams of that file with the one of + /// |to| so that it's possible to replace an opened file. However, if |to| + /// _was_ opened, the temp file now has that open data stream, and + /// ReplaceFileW() fails to delete it, causing a tempo file leak. To fix, ---------------- llvm.org seems to be down, so I cannot access the original patch - but I'm somewhat opposed to making this interface more complex. If we have a coupling of MemoryBuffer to the Rewriter, can we make that explicit instead? https://reviews.llvm.org/D30385 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits