Use of sys::fs::copy_file in the ARC Migration tool

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jul 16 11:17:52 PDT 2013


While working on something else I stumbled on a use of
sys::fs::copy_file in FileRemapper::overwriteOriginal. Given that it
looks like the function wants to move temporary files over originals,
it should probably be using rename, no?

I wrote the attached use_rename.patch,  but then noticed that no test
touches this code path. In fact, the attached dead.patch causes no
failures :-(

Is the code actually dead? If not, any ideas for a testcase that would
execute it? If it is not dead, should it be using rename?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_rename.patch
Type: application/octet-stream
Size: 913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130716/543f4552/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dead.patch
Type: application/octet-stream
Size: 3021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130716/543f4552/attachment-0001.obj>


More information about the cfe-commits mailing list