This is an archive of the discontinued LLVM Phabricator instance.

[libc] add snprintf
ClosedPublic

Authored by michaelrj on May 17 2022, 12:05 PM.

Details

Summary

After adding sprintf, snprintf is simple. The functions are very
similar. The tests only cover the behavior of the max length since the
sprintf tests should cover the other behavior.

Diff Detail

Event Timeline

michaelrj created this revision.May 17 2022, 12:05 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 17 2022, 12:05 PM
michaelrj requested review of this revision.May 17 2022, 12:05 PM
lntue accepted this revision.May 17 2022, 12:29 PM
lntue added inline comments.
libc/src/stdio/snprintf.cpp
27

nit: *handling*

This revision is now accepted and ready to land.May 17 2022, 12:29 PM
michaelrj marked an inline comment as done.May 17 2022, 12:53 PM
This revision was landed with ongoing or failed builds.May 17 2022, 1:33 PM
Closed by commit rG9f1d905f39ac: [libc] add snprintf (authored by michaelrj). · Explain Why
This revision was automatically updated to reflect the committed changes.