Open michaelrj-google opened 6 days ago
@llvm/issue-subscribers-libc
Author: Michael Jones (michaelrj-google)
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
test/
create fine-grained testing targets, so you can e.g. use make check-clang-ast
to only run Clang's AST tests.git clang-format HEAD~1
to format your changes.If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
@llvm/issue-subscribers-good-first-issue
Author: Michael Jones (michaelrj-google)
Could I be assigned this? @michaelrj-google
The scanf reader is the abstraction that scanf uses to read from either a file or a string, similar to printf's writer. Unlike printf, however, there are only two variants of scanf:
fscanf
andsscanf
(justscanf
is the same asfscanf(stdin, ...)
). This means that thestream_getc
andstream_ungetc
functions don't need to be pointers, they can be declared withusing
statements based on the current platform.Files you'll need to edit: libc/src/stdio/scanf_core/vfscanf_internal.h libc/src/stdio/scanf_core/reader.h
What to do: Move the definitions of
getc
andungetc
invfscanf_internal
intoreader.h
(along with the associated#if defined
logic for each target). Define thestream_getc
andstream_ungetc
functions withusing
statements inside ofclass Reader
(or do something equivalent). Clean up the relevant code.If you have questions or need help, feel free to comment on this issue or reach out via the LLVM discord.