This is an archive of the discontinued LLVM Phabricator instance.

[libc++][chrono] Avoid tautological comparisions.
ClosedPublic

Authored by Mordante on Jul 10 2022, 5:40 AM.

Details

Reviewers
ldionne
philnik
Group Reviewers
Restricted Project
Commits
rGef25db495bdb: [libc++][chrono] Avoid tautological comparisions.
Summary

In our implementation the year is always less than or equal to the
class' max(). It's unlikely this ever changes since changing the
year's range will be an ABI break. A static_assert is added as a
guard.

This was reported by @philnik.

Diff Detail

Event Timeline

Mordante created this revision.Jul 10 2022, 5:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2022, 5:40 AM
Mordante requested review of this revision.Jul 10 2022, 5:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2022, 5:40 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Jul 12 2022, 10:09 AM
This revision is now accepted and ready to land.Jul 12 2022, 10:09 AM
This revision was automatically updated to reflect the committed changes.