This is an archive of the discontinued LLVM Phabricator instance.

[libc][cleanup] Fix most conversion warnings
ClosedPublic

Authored by michaelrj on Aug 2 2023, 4:36 PM.

Details

Summary

This patch is large, but is almost entirely just adding casts to calls
to syscall_impl. Much of the work was done programatically, with human
checking when the syntax or types got confusing.

Diff Detail

Event Timeline

michaelrj created this revision.Aug 2 2023, 4:36 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 2 2023, 4:36 PM
michaelrj requested review of this revision.Aug 2 2023, 4:36 PM

https://godbolt.org/z/G5MMexh38 demonstrates another approach that might reduce the boilerplate here.

michaelrj updated this revision to Diff 547041.Aug 3 2023, 4:08 PM

nightmare rebase

michaelrj updated this revision to Diff 547051.Aug 3 2023, 4:54 PM

move to templated syscall_impl

mcgrathr accepted this revision.Aug 4 2023, 2:14 PM

lgtm with a couple nits

libc/src/__support/CPP/bit.h
52 ↗(On Diff #547051)

missing LIBC_INLINE

libc/src/__support/OSUtil/linux/syscall.h
28 ↗(On Diff #547051)

I'm not familiar with a style that uses all-caps for template parameters that aren't single letters.

This revision is now accepted and ready to land.Aug 4 2023, 2:14 PM
michaelrj updated this revision to Diff 547952.Aug 7 2023, 2:39 PM
michaelrj marked 2 inline comments as done.

address comments, fix vfprintf_internal

This revision was automatically updated to reflect the committed changes.