This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Implement `operator<=>` for `filesystem::directory_entry`
ClosedPublic

Authored by avogelsgesang on Jul 31 2022, 4:07 PM.

Details

Summary

Implements part of P1614R2 "The Mothership has Landed"

Diff Detail

Event Timeline

avogelsgesang created this revision.Jul 31 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2022, 4:07 PM
avogelsgesang requested review of this revision.Jul 31 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2022, 4:07 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
avogelsgesang planned changes to this revision.Aug 1 2022, 2:47 PM

need to update based on comments in https://reviews.llvm.org/D130852

rebase on D130859 and fix oversights

SGTM modulo some minor issues.

libcxx/include/__filesystem/directory_entry.h
253

Please use _LIBCPP_HIDE_FROM_ABI in new code and only use one blank line.

254

Please update the synopsis.

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp
32

Instead of updating this macro can you use the generic test macros?

avogelsgesang marked 2 inline comments as done.

address comments

fix test cases

Mordante accepted this revision.Aug 17 2022, 9:44 AM

LGTM modulo some comments.

libcxx/include/filesystem
218

XXX ?? That's not in the standard I assume?

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp
52

I think in other test you tested only one of these asserts, but no real objection against testing both.

This revision is now accepted and ready to land.Aug 17 2022, 9:44 AM
avogelsgesang added inline comments.Aug 17 2022, 10:44 AM
libcxx/include/filesystem
218

that's my marker for "I still need to change something here"... because if I forget to actually address it and don't remove the marker, reviewers will usually catch it - as you just did :)

in this case, I already did the intended changes: I added the removed in comments which were not there of the copy-pasted synopsis from the standard. But I forgot to remove the marker

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/comparisons.pass.cpp
52

good point! Those should be checking AssertComparisonsAreNoexcept<directory_entry> instead of AssertComparisonsAreNoexcept<path>... damn copy-pasting...

This revision was automatically updated to reflect the committed changes.
avogelsgesang marked 3 inline comments as done.