This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add Month enum, refactor mktime_test
ClosedPublic

Authored by jeffbailey on Feb 19 2023, 7:59 PM.

Details

Summary

Introduce Month enum.

Use designated initializers instead of comments to ensure that tm_data
is initialized correctly. Use Month enum for initializing .tm_mon to
avoid off-by-one errors.

Co-authored-by: Raman Tenneti <rtenneti@google.com>

Diff Detail

Event Timeline

jeffbailey created this revision.Feb 19 2023, 7:59 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 19 2023, 7:59 PM
jeffbailey requested review of this revision.Feb 19 2023, 7:59 PM
rtenneti accepted this revision.Feb 21 2023, 9:18 AM

Changes LGTM. Thanks much Jeff for the CL.

This revision is now accepted and ready to land.Feb 21 2023, 9:18 AM
This revision was automatically updated to reflect the committed changes.