[libc-commits] [libc] [libc] Add IPv4 socket options and relates structs (PR #204787)
via libc-commits
libc-commits at lists.llvm.org
Fri Jun 19 02:26:39 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 h,cpp -- libc/hdr/types/struct_ip_mreq.h libc/hdr/types/struct_ip_mreq_source.h libc/hdr/types/struct_ip_mreqn.h libc/hdr/types/struct_ip_msfilter.h libc/hdr/types/struct_ip_opts.h libc/include/llvm-libc-types/struct_ip_mreq.h libc/include/llvm-libc-types/struct_ip_mreq_source.h libc/include/llvm-libc-types/struct_ip_mreqn.h libc/include/llvm-libc-types/struct_ip_msfilter.h libc/include/llvm-libc-types/struct_ip_opts.h libc/test/src/netinet/in_test.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/src/netinet/in_test.cpp b/libc/test/src/netinet/in_test.cpp
index 759f34e9d..eccfdf37d 100644
--- a/libc/test/src/netinet/in_test.cpp
+++ b/libc/test/src/netinet/in_test.cpp
@@ -108,8 +108,10 @@ TEST(LlvmLibcNetinetInTest, IpOptionLayout) {
EXPECT_EQ(offsetof(struct ip_mreq, imr_multiaddr), static_cast<size_t>(0));
EXPECT_EQ(offsetof(struct ip_mreq, imr_interface), static_cast<size_t>(4));
- EXPECT_EQ(offsetof(struct ip_mreq_source, imr_multiaddr), static_cast<size_t>(0));
- EXPECT_EQ(offsetof(struct ip_mreq_source, imr_interface), static_cast<size_t>(4));
+ EXPECT_EQ(offsetof(struct ip_mreq_source, imr_multiaddr),
+ static_cast<size_t>(0));
+ EXPECT_EQ(offsetof(struct ip_mreq_source, imr_interface),
+ static_cast<size_t>(4));
EXPECT_EQ(offsetof(struct ip_mreq_source, imr_sourceaddr),
static_cast<size_t>(8));
@@ -117,8 +119,10 @@ TEST(LlvmLibcNetinetInTest, IpOptionLayout) {
EXPECT_EQ(offsetof(struct ip_mreqn, imr_address), static_cast<size_t>(4));
EXPECT_EQ(offsetof(struct ip_mreqn, imr_ifindex), static_cast<size_t>(8));
- EXPECT_EQ(offsetof(struct ip_msfilter, imsf_multiaddr), static_cast<size_t>(0));
- EXPECT_EQ(offsetof(struct ip_msfilter, imsf_interface), static_cast<size_t>(4));
+ EXPECT_EQ(offsetof(struct ip_msfilter, imsf_multiaddr),
+ static_cast<size_t>(0));
+ EXPECT_EQ(offsetof(struct ip_msfilter, imsf_interface),
+ static_cast<size_t>(4));
EXPECT_EQ(offsetof(struct ip_msfilter, imsf_fmode), static_cast<size_t>(8));
EXPECT_EQ(offsetof(struct ip_msfilter, imsf_numsrc), static_cast<size_t>(12));
EXPECT_EQ(offsetof(struct ip_msfilter, imsf_slist), static_cast<size_t>(16));
``````````
</details>
https://github.com/llvm/llvm-project/pull/204787
More information about the libc-commits
mailing list