[libc-commits] [libc] [libc] Introduce a typed syscall wrapper and use it in mmap (PR #197459)
via libc-commits
libc-commits at lists.llvm.org
Fri May 15 00:29:32 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/OSUtil/linux/auxv.h libc/src/__support/OSUtil/linux/syscall.h libc/src/__support/OSUtil/linux/syscall_wrappers/mmap.h libc/src/__support/threads/linux/thread.cpp libc/startup/linux/aarch64/tls.cpp libc/startup/linux/riscv/tls.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/OSUtil/linux/syscall_wrappers/mmap.h b/libc/src/__support/OSUtil/linux/syscall_wrappers/mmap.h
index f1024faff..52f139d54 100644
--- a/libc/src/__support/OSUtil/linux/syscall_wrappers/mmap.h
+++ b/libc/src/__support/OSUtil/linux/syscall_wrappers/mmap.h
@@ -46,8 +46,8 @@ LIBC_INLINE ErrorOr<void *> mmap(void *addr, size_t size, int prot, int flags,
// TODO: Reject sizes that are (after page alignment) larger than PTRDIFF_MAX.
// This is mainly relevant for 32-bit architectures.
- return syscall_checked<void*>(syscall_number, addr, size, prot, flags, fd,
- offset_for_syscall);
+ return syscall_checked<void *>(syscall_number, addr, size, prot, flags, fd,
+ offset_for_syscall);
}
} // namespace linux_syscalls
``````````
</details>
https://github.com/llvm/llvm-project/pull/197459
More information about the libc-commits
mailing list