This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Add a missing assertion in std::span's constructor
ClosedPublic

Authored by ldionne on Aug 11 2022, 7:29 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG8c6319e30a35: [libc++] Add a missing assertion in std::span's constructor
Summary

Also, add missing tests for assertions in span constructors. Now I
believe that all of std::span's API should be hardened, and all the
assertions should have a corresponding test.

Diff Detail

Event Timeline

ldionne created this revision.Aug 11 2022, 7:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2022, 7:29 AM
ldionne requested review of this revision.Aug 11 2022, 7:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2022, 7:29 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Aug 11 2022, 12:31 PM
This revision is now accepted and ready to land.Aug 11 2022, 12:31 PM
jloser added a subscriber: jloser.Aug 11 2022, 2:18 PM

LGTM! I checked the other methods like first, last, subspan, etc. and I'm happy with the coverage for testing LIBCPP_ASSERTs.