[libc-commits] [libc] [libc] Implement fchown (PR #167286)
via libc-commits
libc-commits at lists.llvm.org
Sun Nov 9 23:50:30 PST 2025
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/src/unistd/fchown.h libc/src/unistd/linux/fchown.cpp libc/test/src/unistd/fchown_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/src/unistd/fchown.h b/libc/src/unistd/fchown.h
index 23c6295da..575f6173e 100644
--- a/libc/src/unistd/fchown.h
+++ b/libc/src/unistd/fchown.h
@@ -19,5 +19,4 @@ int fchown(int fildes, uid_t owner, gid_t group);
} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_UNISTD_FCHOWN_H_
+#endif // LLVM_LIBC_SRC_UNISTD_FCHOWN_H_
diff --git a/libc/test/src/unistd/fchown_test.cpp b/libc/test/src/unistd/fchown_test.cpp
index b44b728d3..c29914ef4 100644
--- a/libc/test/src/unistd/fchown_test.cpp
+++ b/libc/test/src/unistd/fchown_test.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "src/fcntl/open.h"
-#include "src/unistd/fchown.h"
#include "src/unistd/close.h"
+#include "src/unistd/fchown.h"
#include "src/unistd/getgid.h"
#include "src/unistd/getuid.h"
#include "src/unistd/unlink.h"
@@ -46,6 +46,5 @@ TEST_F(LlvmLibcFchownTest, FchownSuccess) {
TEST_F(LlvmLibcFchownTest, ChownInvalidFileDescriptor) {
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
- ASSERT_THAT(LIBC_NAMESPACE::chown(-1, 1000, 1000),
- Fails(ENOENT));
+ ASSERT_THAT(LIBC_NAMESPACE::chown(-1, 1000, 1000), Fails(ENOENT));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/167286
More information about the libc-commits
mailing list