Page MenuHomeFreeBSD

clang-format libc string functions imported from musl
Needs ReviewPublic

Authored by emaste on Sep 8 2020, 12:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 10 2024, 2:00 AM
Unknown Object (File)
Dec 10 2023, 10:44 PM
Unknown Object (File)
Nov 10 2023, 5:29 AM
Unknown Object (File)
Oct 9 2023, 4:17 AM
Unknown Object (File)
Sep 17 2023, 8:23 PM
Unknown Object (File)
Sep 17 2023, 3:19 AM
Unknown Object (File)
Jun 27 2023, 7:29 AM
Unknown Object (File)
May 6 2023, 9:22 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

We have adopted these and don't consider them 'contrib' code.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.
emaste added inline comments.
lib/libc/string/strcspn.c
31–32

splitting between the 1 and << seems confusing

I much prefer the formatted version, except perhaps for the BITOP macro.

We have adopted these functions; changes from musl, if any, would be manually applied if this change goes in.
OpenBSD also imported some musl string routines and reformatted them.

arichardson added inline comments.
lib/libc/string/strcspn.c
31–32

Seems like clang-format assumes that op( is a function call and then the formatting for the rest of the line is broken.
It might also like breaking before << because of LLVM's streaming I/O classes where that formatting does make sense.