This patch adds the %a/A conversions to printf, as well as the compiler
flag to disable floating point handling entirely. This will allow our
printf implementation to display every type of argument allowed by
printf, although some formats are still incomplete.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Few nits inline.
libc/src/stdio/printf_core/converter.cpp | ||
---|---|---|
47 | A comment for future: Do we have the CMake plumbing for any of these? If not, we should probably do it and have explicitly listed tests for them? | |
libc/src/stdio/printf_core/float_hex_converter.h | ||
103 | Why should this be static? | |
116 | Same here, why static? | |
173 | Ditto. | |
213 | But is missing here! | |
217 | And here! | |
libc/test/src/stdio/sprintf_test.cpp | ||
20 | What is this comment about? |
libc/src/stdio/printf_core/converter.cpp | ||
---|---|---|
47 | There isn't CMake plumbing for these yet, I was planning on waiting until the main code was done to work on the cmake. The tests in sprintf_test.cpp are already set up to work when pieces are disabled by using the same flags, although I haven't added anything to test behavior when pieces are disabled. | |
libc/src/stdio/printf_core/float_hex_converter.h | ||
103 | I don't remember, why I had some constexpr variables marked as static, so I've changed them all to not be static. | |
libc/test/src/stdio/sprintf_test.cpp | ||
20 | Ah, I forgot to remove that. I used it to make sure that my tests were correct by switching my implementation of printf with the system's. |
A comment for future: Do we have the CMake plumbing for any of these? If not, we should probably do it and have explicitly listed tests for them?