This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add implementations for isblank, iscntrl, isgraph, ispunct.
ClosedPublic

Authored by cgyurgyik on Jul 31 2020, 4:48 PM.

Diff Detail

Event Timeline

cgyurgyik created this revision.Jul 31 2020, 4:48 PM
cgyurgyik requested review of this revision.Jul 31 2020, 4:48 PM
sivachandra added inline comments.Aug 4 2020, 11:25 AM
libc/src/ctype/ctype_utils.h
29

I should have said said this earlier: seems to me like all the functions in cytype_utils.h can take const unsigned char argument.

33

Wouldn't it read better this way:

return 0x20 < ch && ch < 0x7f;

Obvious to check that it matches exactly what the standard says.

sivachandra accepted this revision.Aug 4 2020, 11:25 AM
This revision is now accepted and ready to land.Aug 4 2020, 11:25 AM
cgyurgyik updated this revision to Diff 282987.Aug 4 2020, 11:51 AM

Address siva's comments.

cgyurgyik marked 2 inline comments as done.Aug 4 2020, 11:51 AM
cgyurgyik added inline comments.
libc/src/ctype/ctype_utils.h
29

Yeah much cleaner thanks.

This revision was landed with ongoing or failed builds.Aug 4 2020, 12:17 PM
This revision was automatically updated to reflect the committed changes.
cgyurgyik marked an inline comment as done.