[libc-commits] [libc] [libc] Implement freopen (PR #207837)

via libc-commits libc-commits at lists.llvm.org
Tue Aug 18 10:12:21 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/stdio/freopen.h libc/src/stdio/generic/freopen.cpp libc/test/src/stdio/freopen_test.cpp libc/src/__support/File/file.h libc/src/__support/File/linux/file.cpp libc/src/__support/File/linux/file.h libc/src/stdio/generic/fopen.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/stdio/freopen_test.cpp b/libc/test/src/stdio/freopen_test.cpp
index 258c468dc..aa44c7e1c 100644
--- a/libc/test/src/stdio/freopen_test.cpp
+++ b/libc/test/src/stdio/freopen_test.cpp
@@ -320,8 +320,7 @@ TEST_F(LlvmLibcFreopenTest, StdoutFailureTest) {
 #endif
 
 TEST_F(LlvmLibcFreopenTest, NullStreamFailure) {
-  const auto FILENAME =
-      libc_make_test_file_path("freopen_null_stream.test");
+  const auto FILENAME = libc_make_test_file_path("freopen_null_stream.test");
   const char *fn = FILENAME;
 
   EXPECT_DEATH([=] { LIBC_NAMESPACE::freopen(fn, "r", nullptr); },

``````````

</details>


https://github.com/llvm/llvm-project/pull/207837


More information about the libc-commits mailing list