[libc-commits] [libc] [libc] Support configurable errno modes (PR #98287)

via libc-commits libc-commits at lists.llvm.org
Wed Jul 10 01:46:15 PDT 2024


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 93869dfd89387844bf8b605ebcd1abc0cc81bde8 3c915c740cd1439486fd2578ed54e2cfa7edef82 -- libc/src/errno/libc_errno.cpp libc/src/errno/libc_errno.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/errno/libc_errno.cpp b/libc/src/errno/libc_errno.cpp
index ccc7467ed2..cf42f26e01 100644
--- a/libc/src/errno/libc_errno.cpp
+++ b/libc/src/errno/libc_errno.cpp
@@ -20,11 +20,11 @@
 #error LIBC_ERRNO_MODE is not defined
 #endif
 
-#if LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_NONE && \
-    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_INTERNAL && \
-    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_EXTERNAL && \
-    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_THREAD_LOCAL && \
-    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_GLOBAL && \
+#if LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_NONE &&                                 \
+    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_INTERNAL &&                             \
+    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_EXTERNAL &&                             \
+    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_THREAD_LOCAL &&                         \
+    LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_GLOBAL &&                               \
     LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_LOCATION
 #error LIBC_ERRNO_MODE must be one of the following values: \
 LIBC_ERRNO_MODE_NONE, \

``````````

</details>


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


More information about the libc-commits mailing list