[libc-commits] [libc] [libc] Add proxy header for the jmp_buf type (PR #107712)
via libc-commits
libc-commits at lists.llvm.org
Sat Sep 7 11:45:21 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 23a26e7120df474f37f7369e8e06fd90f21a58b5 dfd1cabc2ea248b93d46c0603feb40e7dbe61a3e --extensions cpp,h -- libc/hdr/types/jmp_buf.h libc/hdr/types/stack_t.h libc/src/setjmp/aarch64/longjmp.cpp libc/src/setjmp/aarch64/setjmp.cpp libc/src/setjmp/arm/longjmp.cpp libc/src/setjmp/arm/setjmp.cpp libc/src/setjmp/longjmp.h libc/src/setjmp/riscv/longjmp.cpp libc/src/setjmp/riscv/setjmp.cpp libc/src/setjmp/setjmp_impl.h libc/src/setjmp/x86_64/longjmp.cpp libc/src/setjmp/x86_64/setjmp.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/setjmp/aarch64/setjmp.cpp b/libc/src/setjmp/aarch64/setjmp.cpp
index fac249a93d..8dd1eb342c 100644
--- a/libc/src/setjmp/aarch64/setjmp.cpp
+++ b/libc/src/setjmp/aarch64/setjmp.cpp
@@ -12,8 +12,7 @@
namespace LIBC_NAMESPACE_DECL {
-[[gnu::naked]] LLVM_LIBC_FUNCTION(int, setjmp,
- ([[maybe_unused]] jmp_buf buf)) {
+[[gnu::naked]] LLVM_LIBC_FUNCTION(int, setjmp, ([[maybe_unused]] jmp_buf buf)) {
// If BTI branch protection is in use, the compiler will automatically insert
// a BTI here, so we don't need to make any extra effort to do so.
diff --git a/libc/src/setjmp/longjmp.h b/libc/src/setjmp/longjmp.h
index 9f2f7ddaf0..7cb12b3392 100644
--- a/libc/src/setjmp/longjmp.h
+++ b/libc/src/setjmp/longjmp.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_SETJMP_LONGJMP_H
#define LLVM_LIBC_SRC_SETJMP_LONGJMP_H
-#include "src/__support/macros/config.h"
#include "hdr/types/jmp_buf.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/setjmp/setjmp_impl.h b/libc/src/setjmp/setjmp_impl.h
index f2304277fe..4175a7397a 100644
--- a/libc/src/setjmp/setjmp_impl.h
+++ b/libc/src/setjmp/setjmp_impl.h
@@ -11,8 +11,8 @@
// This header has the _impl prefix in its name to avoid conflict with the
// public header setjmp.h which is also included. here.
-#include "src/__support/macros/config.h"
#include "hdr/types/jmp_buf.h"
+#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
``````````
</details>
https://github.com/llvm/llvm-project/pull/107712
More information about the libc-commits
mailing list