This is an archive of the discontinued LLVM Phabricator instance.

Testing: Make TempFile safe to move; test Temp{Dir,File,Link}
ClosedPublic

Authored by dexonsmith on Feb 28 2022, 5:27 PM.

Details

Summary

Default the moves and delete the copies for TempFile, matching TempDir
and TempLink, and add tests for all of them to confirm that the
destructor is not harmful after it has been moved from.

Diff Detail

Event Timeline

dexonsmith created this revision.Feb 28 2022, 5:27 PM
dexonsmith requested review of this revision.Feb 28 2022, 5:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 5:27 PM

Fix unit test; noticed by inspection that the call to TempLink's constructor wasn't using D.path(), so this was dropping a symlink wherever the CWD of the test was.

dblaikie accepted this revision.Mar 1 2022, 12:41 PM

Sounds good :)

This revision is now accepted and ready to land.Mar 1 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 12:41 PM
This revision was landed with ongoing or failed builds.Mar 1 2022, 1:48 PM
This revision was automatically updated to reflect the committed changes.

Sounds good :)

Thanks! Pushed as 15ab7bc3af3c9f38b3404599d76e4ec3727a0f76 after:

  • fixing clang-format
  • looking at failing bots for Linux (lots of failing tests that look related to OpenMP, so I've ignored...)