This is an archive of the discontinued LLVM Phabricator instance.

[libc++][spaceship] Implement `operator<=>` for `deque`
ClosedPublic

Authored by H-G-Hristov on Feb 26 2023, 2:03 AM.

Diff Detail

Event Timeline

H-G-Hristov created this revision.Feb 26 2023, 2:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2023, 2:03 AM
H-G-Hristov requested review of this revision.Feb 26 2023, 2:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2023, 2:03 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
H-G-Hristov abandoned this revision.Feb 26 2023, 2:52 AM

Updated papers status

H-G-Hristov abandoned this revision.Feb 26 2023, 3:02 AM
  • [libc++][spaceship] Implement operator<=> for deque
  • Removed test_container_comparisons.h

Based on https://reviews.llvm.org/D132312

H-G-Hristov edited the summary of this revision. (Show Details)Feb 26 2023, 5:11 AM
H-G-Hristov retitled this revision from Updated: Cxx2bPapers.csv to [libc++][spaceship] Implement `operator<=>` for `deque`.
H-G-Hristov edited the summary of this revision. (Show Details)
avogelsgesang added a subscriber: Mordante.

Thanks for this change!

In general, I won't be able to approve your commit for the libc++ group. In the end, you will need the review from one of the "core libc++ contributors" (e.g., @Mordante) to ship this fix.

Also, for "stacked commits", i.e. commits which depend on other changes which didn't land on main, yet, you need to add a parent revision here on Phabricator. I did this for you already and also restarted the CI job. So this is just for future reference :)

Please also update libcxx/docs/Status/SpaceshipProjects.csv

libcxx/include/deque
2398

We need to ADL-proof this. My other commit for std::list was actually also missing this. A clang-tidy check in our CI should catch this and report an error for this line...

libcxx/test/libcxx/containers/sequences/deque/compare.three_way.pass.cpp
26

missing newline at end of file

(I assume you are on Windows? In case you are using VS Code, there is an "Insert Final Newline" setting which you might want to change)

avogelsgesang added inline comments.Feb 27 2023, 3:55 PM
libcxx/test/libcxx/containers/sequences/deque/compare.three_way.pass.cpp
10
  • [libc++][spaceship] Implement operator<=> for deque
  • Removed test_container_comparisons.h
  • Addressed code reviews
  • Restored
H-G-Hristov marked 3 inline comments as done.Mar 1 2023, 2:21 AM

Thanks for this change!

In general, I won't be able to approve your commit for the libc++ group. In the end, you will need the review from one of the "core libc++ contributors" (e.g., @Mordante) to ship this fix.

Also, for "stacked commits", i.e. commits which depend on other changes which didn't land on main, yet, you need to add a parent revision here on Phabricator. I did this for you already and also restarted the CI job. So this is just for future reference :)

Please also update libcxx/docs/Status/SpaceshipProjects.csv

Thank you very much for the review and the notes and of course for completing the real work previously. I wanted to try out the process of submitting a patch.

A have a couple of questions:

  1. Do I need to add anyone specific as a reviewer, message/ask somebody or I should just wait.
  2. If this patch passes the review successfully, would you mind if I try completing some of the other containers too?
H-G-Hristov added inline comments.Mar 1 2023, 2:24 AM
libcxx/test/libcxx/containers/sequences/deque/compare.three_way.pass.cpp
26

I don't get it. Is this file still missing an empty line?

philnik accepted this revision.Mar 1 2023, 7:46 AM
philnik added a subscriber: philnik.

Thanks for this change!

In general, I won't be able to approve your commit for the libc++ group. In the end, you will need the review from one of the "core libc++ contributors" (e.g., @Mordante) to ship this fix.

Also, for "stacked commits", i.e. commits which depend on other changes which didn't land on main, yet, you need to add a parent revision here on Phabricator. I did this for you already and also restarted the CI job. So this is just for future reference :)

Please also update libcxx/docs/Status/SpaceshipProjects.csv

Thank you very much for the review and the notes and of course for completing the real work previously. I wanted to try out the process of submitting a patch.

A have a couple of questions:

  1. Do I need to add anyone specific as a reviewer, message/ask somebody or I should just wait.

For libc++ not, because #libc gets automatically added, so every libc++ approver gets notified. For other subprojects that's not necessarily the case, so you might have to add people.

  1. If this patch passes the review successfully, would you mind if I try completing some of the other containers too?

Feel free to do so, but make sure there isn't a patch already (AFAICT for spaceship there is only for array and vector a patch). More contributors are always welcome.

LGTM % nits. I guess you don't have commit access? In that case, please provide "Your Name" <your.email@address>.

libcxx/include/deque
146–149
libcxx/test/libcxx/containers/sequences/deque/compare.three_way.pass.cpp
17–18
26

No. Phab only complains about it when there isn't one.

This revision is now accepted and ready to land.Mar 1 2023, 7:46 AM

Addressed review comments

H-G-Hristov marked an inline comment as done.Mar 1 2023, 9:22 AM
Mordante accepted this revision.Mar 1 2023, 10:52 AM

not necessarily the case, so you might have to add people.

  1. If this patch passes the review successfully, would you mind if I try completing some of the other containers too?

Feel free to do so, but make sure there isn't a patch already (AFAICT for spaceship there is only for array and vector a patch). More contributors are always welcome.

Feel free to pick the items that are unassigned. When you want to pick an assigned item, best discuss on Discord. Some of the assigned items may have a patch already.

Thanks for your contribution, LGTM!

  • Addressed comment
H-G-Hristov marked an inline comment as done.Mar 2 2023, 11:04 AM

@philnik @Mordante Thank you for your feedback!

Here is my name and email:

Hristo Hristov <zingam@outlook.com>

This revision was automatically updated to reflect the committed changes.