Page MenuHomeFreeBSD

clang-format libc string functions imported from musl
Needs ReviewPublic

Authored by emaste on Tue, Sep 8, 12:51 AM.
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
Unit Tests Skipped

Event Timeline

emaste requested review of this revision.Tue, Sep 8, 12:51 AM
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.