This is an archive of the discontinued LLVM Phabricator instance.

[libc++][test] Clean up libcxx/test/support/MoveOnly.h
ClosedPublic

Authored by jloser on Jan 28 2022, 11:43 AM.

Details

Summary

Remove copy and copy assignment rather than have them as private declarations.
They are superfluous given the move and move assignment.

As a drive-by, also specialize std::hash without reopening namespace std.

Diff Detail

Event Timeline

jloser requested review of this revision.Jan 28 2022, 11:43 AM
jloser created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 11:43 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jloser updated this revision to Diff 404116.Jan 28 2022, 11:43 AM
jloser retitled this revision from [libcxx][test] Use = delete in libcxx/test/suppor/MoveOnly.h to [libcxx][test] Use = delete in libcxx/test/support/MoveOnly.h.

Fix type in git one-liner

philnik accepted this revision as: philnik.Jan 28 2022, 12:18 PM
Quuxplusone requested changes to this revision.Jan 28 2022, 12:43 PM
Quuxplusone added inline comments.
libcxx/test/support/MoveOnly.h
29–31

Just eliminate these; they're superfluous given lines 24–27.

But also, please re-upload the diff tagging it "libc++", because it doesn't look like the buildkite CI actually ran. It's just saying "Build 216170: arc lint + arc unit". https://reviews.llvm.org/harbormaster/build/216170/

This revision now requires changes to proceed.Jan 28 2022, 12:43 PM
jloser updated this revision to Diff 404167.Jan 28 2022, 2:27 PM
jloser retitled this revision from [libcxx][test] Use = delete in libcxx/test/support/MoveOnly.h to [libc++][test] Clean up libcxx/test/support/MoveOnly.h.
jloser edited the summary of this revision. (Show Details)

Remove copy and copy assignment rather than = delete them
s/libcxx/libc++ in the one liner so CI runs

jloser updated this revision to Diff 404191.Jan 28 2022, 4:10 PM

Adjust expected-error message in libcxx/test/std/containers/sequences/array/array.creation/to_array.fail.cpp which should fix CI

jloser updated this revision to Diff 404199.Jan 28 2022, 4:58 PM
jloser marked an inline comment as done.

Fix the expected-error message in to_array.fail.pass tests now that the MoveOnly copy constructor is actually implicitly deleted

Quuxplusone accepted this revision.Jan 29 2022, 7:09 AM

The Apple build CI failure is unrelated. Ship it!

This revision is now accepted and ready to land.Jan 29 2022, 7:09 AM
This revision was landed with ongoing or failed builds.Jan 29 2022, 3:21 PM
This revision was automatically updated to reflect the committed changes.