[libc-commits] [libc] [libc] Allow using sscanf() and vsscanf() on baremetal targets. (PR #130527)
via libc-commits
libc-commits at lists.llvm.org
Sun Mar 9 16:53:21 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 437d587e48002929552d982c9e2dc73428a37dd9 e9b681a59e47dc5ee8a70ef1415dbac5173b16f5 --extensions cpp,h -- libc/src/stdio/baremetal/getchar.cpp libc/src/stdio/scanf_core/reader.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/stdio/scanf_core/reader.h b/libc/src/stdio/scanf_core/reader.h
index 281dabe7fa..d195dd5170 100644
--- a/libc/src/stdio/scanf_core/reader.h
+++ b/libc/src/stdio/scanf_core/reader.h
@@ -11,7 +11,8 @@
#include "hdr/types/FILE.h"
-#if !defined(LIBC_COPT_STDIO_USE_SYSTEM_FILE) && !defined(LIBC_TARGET_OS_IS_BAREMETAL)
+#if !defined(LIBC_COPT_STDIO_USE_SYSTEM_FILE) && \
+ !defined(LIBC_TARGET_OS_IS_BAREMETAL)
#include "src/__support/File/file.h"
#endif
@@ -19,8 +20,8 @@
#include "src/stdio/getc.h"
#include "src/stdio/ungetc.h"
#elif defined(LIBC_TARGET_OS_IS_BAREMETAL)
-#include "src/stdio/getchar.h"
#include "hdr/stdio_macros.h" // for EOF.
+#include "src/stdio/getchar.h"
#endif
#include "src/__support/macros/attributes.h" // For LIBC_INLINE
``````````
</details>
https://github.com/llvm/llvm-project/pull/130527
More information about the libc-commits
mailing list