[libc-commits] [libc] [llvm] [libc][NFC] Port raw syscall users to existing syscall_wrappers (PR #208039)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 8 08:24:33 PDT 2026
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 origin/main HEAD --extensions cpp,h -- libc/src/__support/File/linux/dir.cpp libc/src/__support/File/linux/file.cpp libc/src/__support/OSUtil/linux/auxv.h libc/src/__support/threads/linux/thread.cpp libc/src/sched/linux/sched_getaffinity.cpp libc/src/spawn/linux/posix_spawn.cpp libc/src/stdio/linux/remove.cpp libc/src/sys/ipc/linux/ftok.cpp libc/src/sys/mman/linux/shm_unlink.cpp libc/src/sys/time/linux/utimes.cpp libc/startup/linux/x86_64/tls.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/threads/linux/thread.cpp b/libc/src/__support/threads/linux/thread.cpp
index 1983ff677..f094484b6 100644
--- a/libc/src/__support/threads/linux/thread.cpp
+++ b/libc/src/__support/threads/linux/thread.cpp
@@ -438,8 +438,8 @@ int Thread::set_name(const cpp::string_view &name) {
if (!fd)
return fd.error();
- auto write_result = linux_syscalls::write(fd.value(), name.data(),
- name.size());
+ auto write_result =
+ linux_syscalls::write(fd.value(), name.data(), name.size());
linux_syscalls::close(fd.value());
if (!write_result)
diff --git a/libc/src/sys/ipc/linux/ftok.cpp b/libc/src/sys/ipc/linux/ftok.cpp
index 1aa78292b..f1e2965dd 100644
--- a/libc/src/sys/ipc/linux/ftok.cpp
+++ b/libc/src/sys/ipc/linux/ftok.cpp
@@ -18,9 +18,8 @@ namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(key_t, ftok, (const char *path, int id)) {
internal::kernel_statx_buf xbuf;
- auto err = linux_syscalls::statx(AT_FDCWD, path, 0,
- internal::KERNEL_STATX_BASIC_STATS_MASK,
- &xbuf);
+ auto err = linux_syscalls::statx(
+ AT_FDCWD, path, 0, internal::KERNEL_STATX_BASIC_STATS_MASK, &xbuf);
if (!err.has_value()) {
libc_errno = err.error();
``````````
</details>
https://github.com/llvm/llvm-project/pull/208039
More information about the libc-commits
mailing list