[libc-commits] [libc] [libc] Implement pthread_attr_[gs]etscope (PR #222956)

via libc-commits libc-commits at lists.llvm.org
Fri Sep 11 07:33:58 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/pthread/pthread_attr_getscope.cpp libc/src/pthread/pthread_attr_getscope.h libc/src/pthread/pthread_attr_setscope.cpp libc/src/pthread/pthread_attr_setscope.h libc/include/llvm-libc-macros/pthread-macros.h libc/test/src/pthread/pthread_attr_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/pthread/pthread_attr_getscope.cpp b/libc/src/pthread/pthread_attr_getscope.cpp
index 8fc22f9e0..b9fd83a3c 100644
--- a/libc/src/pthread/pthread_attr_getscope.cpp
+++ b/libc/src/pthread/pthread_attr_getscope.cpp
@@ -30,4 +30,3 @@ LLVM_LIBC_FUNCTION(int, pthread_attr_getscope,
 }
 
 } // namespace LIBC_NAMESPACE_DECL
-
diff --git a/libc/src/pthread/pthread_attr_getscope.h b/libc/src/pthread/pthread_attr_getscope.h
index 11123c07c..f19e79038 100644
--- a/libc/src/pthread/pthread_attr_getscope.h
+++ b/libc/src/pthread/pthread_attr_getscope.h
@@ -25,4 +25,3 @@ int pthread_attr_getscope(const pthread_attr_t *__restrict attr,
 } // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC_PTHREAD_PTHREAD_ATTR_GETSCOPE_H
-
diff --git a/libc/src/pthread/pthread_attr_setscope.cpp b/libc/src/pthread/pthread_attr_setscope.cpp
index 6e30d4502..52057a8c5 100644
--- a/libc/src/pthread/pthread_attr_setscope.cpp
+++ b/libc/src/pthread/pthread_attr_setscope.cpp
@@ -21,7 +21,7 @@
 namespace LIBC_NAMESPACE_DECL {
 
 LLVM_LIBC_FUNCTION(int, pthread_attr_setscope,
-                   ([[maybe_unused]] pthread_attr_t *attr,
+                   ([[maybe_unused]] pthread_attr_t * attr,
                     int contentionscope)) {
   LIBC_CRASH_ON_NULLPTR(attr);
 
@@ -36,4 +36,3 @@ LLVM_LIBC_FUNCTION(int, pthread_attr_setscope,
 }
 
 } // namespace LIBC_NAMESPACE_DECL
-
diff --git a/libc/src/pthread/pthread_attr_setscope.h b/libc/src/pthread/pthread_attr_setscope.h
index cbd057ee8..a83ba5a23 100644
--- a/libc/src/pthread/pthread_attr_setscope.h
+++ b/libc/src/pthread/pthread_attr_setscope.h
@@ -24,4 +24,3 @@ int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
 } // namespace LIBC_NAMESPACE_DECL
 
 #endif // LLVM_LIBC_SRC_PTHREAD_PTHREAD_ATTR_SETSCOPE_H
-

``````````

</details>


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


More information about the libc-commits mailing list