[libc] [llvm] [libc] Add fixed point support to printf (PR #82707)
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 15:01:41 PST 2024
================
@@ -3201,6 +3201,166 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoLongDoubleConv) {
#endif // LIBC_COPT_PRINTF_DISABLE_FLOAT
+#if defined(LIBC_COMPILER_HAS_FIXED_POINT) && \
+ !defined(LIBC_COPT_PRINTF_DISABLE_FIXED_POINT)
+TEST_F(LlvmLibcSPrintfTest, FixedConv) {
+
+ // These numeric tests are potentially a little weak, but the fuzz test is
+ // more thorough than my handwritten tests tend to be.
+
+ // TODO: Commit the fuzzer
+
+ written = LIBC_NAMESPACE::sprintf(buff, "%k", 0x0);
----------------
nickdesaulniers wrote:
Perhaps a todo about using fixed point literals rather than hex?
https://github.com/llvm/llvm-project/pull/82707
More information about the llvm-commits
mailing list