[libc-commits] [libc] [libc] Provide baremetal implementation of getchar (PR #98059)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 11:04:49 PDT 2024


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 402eca265f7162e26b8b74d18297fd76c9f100de b53c5bb4f99ff5bb48f3740428851f2feb2fb1e0 -- libc/src/stdio/baremetal/getchar.cpp libc/src/__support/OSUtil/baremetal/io.cpp libc/src/__support/OSUtil/baremetal/io.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/__support/OSUtil/baremetal/io.cpp b/libc/src/__support/OSUtil/baremetal/io.cpp
index 0b81903a99..1c018e587e 100644
--- a/libc/src/__support/OSUtil/baremetal/io.cpp
+++ b/libc/src/__support/OSUtil/baremetal/io.cpp
@@ -20,7 +20,8 @@ extern "C" void __llvm_libc_log_write(const char *msg, size_t len);
 namespace LIBC_NAMESPACE {
 
 ssize_t read_from_stdin(char *buf, size_t size) {
-  return __llvm_libc_stdin_read(static_cast<void*>(&__llvm_libc_stdin), buf, size);
+  return __llvm_libc_stdin_read(static_cast<void *>(&__llvm_libc_stdin), buf,
+                                size);
 }
 
 void write_to_stderr(cpp::string_view msg) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/98059


More information about the libc-commits mailing list