[libc-commits] [libc] [libc][sched] Fix generated scheduler prototypes (PR #195332)

via libc-commits libc-commits at lists.llvm.org
Fri May 1 12:24:01 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/include/sched_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/include/sched_test.cpp b/libc/test/include/sched_test.cpp
index f87e156ee..05a38fc24 100644
--- a/libc/test/include/sched_test.cpp
+++ b/libc/test/include/sched_test.cpp
@@ -23,11 +23,11 @@ static_assert(SameType<decltype(CPU_COUNT((cpu_set_t *)0)), int>::value, "");
 static_assert(SameType<decltype(CPU_SET(0, (cpu_set_t *)0)), void>::value, "");
 static_assert(SameType<decltype(CPU_ISSET(0, (cpu_set_t *)0)), int>::value, "");
 
+static_assert(SameType<decltype(sched_getscheduler((pid_t)0)), int>::value, "");
 static_assert(
-    SameType<decltype(sched_getscheduler((pid_t)0)), int>::value, "");
-static_assert(SameType<decltype(sched_setscheduler(
-                            (pid_t)0, SCHED_OTHER,
-                            (const struct sched_param *)0)), int>::value,
-              "");
+    SameType<decltype(sched_setscheduler((pid_t)0, SCHED_OTHER,
+                                         (const struct sched_param *)0)),
+             int>::value,
+    "");
 
 extern "C" int main() { return 0; }

``````````

</details>


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


More information about the libc-commits mailing list