[libc-commits] [libc] [Libc] Support LLVM libc minor variant overlay builds. (PR #212774)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 29 07:28:18 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 -- libc/test/UnitTest/HermeticTestUtils.cpp libc/test/UnitTest/LibcTest.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/test/UnitTest/HermeticTestUtils.cpp b/libc/test/UnitTest/HermeticTestUtils.cpp
index 3716ed278..42b5e522d 100644
--- a/libc/test/UnitTest/HermeticTestUtils.cpp
+++ b/libc/test/UnitTest/HermeticTestUtils.cpp
@@ -68,8 +68,7 @@ LIBC_HERMETIC_TEST_SHIM int memcmp(const void *lhs, const void *rhs,
return LIBC_NAMESPACE::memcmp(lhs, rhs, count);
}
LIBC_HERMETIC_TEST_SHIM void *memcpy(void *__restrict dst,
- const void *__restrict src,
- size_t count) {
+ const void *__restrict src, size_t count) {
return LIBC_NAMESPACE::memcpy(dst, src, count);
}
LIBC_HERMETIC_TEST_SHIM void *memmove(void *dst, const void *src,
@@ -94,8 +93,10 @@ void *aligned_alloc(size_t align, size_t s) {
return static_cast<uint64_t>(ptr - memory) >= MEMORY_SIZE ? nullptr : mem;
}
-LIBC_HERMETIC_TEST_SHIM void *malloc(size_t s) { return aligned_alloc(ALIGNMENT, s); }
-
+LIBC_HERMETIC_TEST_SHIM void *malloc(size_t s) {
+ return aligned_alloc(ALIGNMENT, s);
+}
+
LIBC_HERMETIC_TEST_SHIM void free(void *) {}
LIBC_HERMETIC_TEST_SHIM void *realloc(void *mem, size_t s) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/212774
More information about the libc-commits
mailing list