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 h,c,cpp,hpp -- 
libunwind/include/libunwind.h 
libunwind/include/mach-o/compact_unwind_encoding.h 
libunwind/include/unwind_itanium.h libunwind/src/FrameHeaderCache.hpp 
libunwind/src/Registers.hpp libunwind/src/UnwindCursor.hpp 
libunwind/src/UnwindLevel1-gcc-ext.c libunwind/src/UnwindLevel1.c 
libunwind/src/libunwind.cpp libunwind/src/libunwind_ext.h 
--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/libunwind/include/libunwind.h b/libunwind/include/libunwind.h
index 6c2dfe58e..fe2acad31 100644
--- a/libunwind/include/libunwind.h
+++ b/libunwind/include/libunwind.h
@@ -122,8 +122,8 @@
     __unwind_ptrauth_restricted_intptr(ptrauth_key_function_pointer, 1, \
                                        
__ptrauth_unwind_cie_info_personality_disc)
 
-  // ptrauth_string_discriminator("personality") == 0x7EAD
-  #define __ptrauth_unwind_pauthtest_personality_disc 0x7EAD
+// ptrauth_string_discriminator("personality") == 0x7EAD
+#define __ptrauth_unwind_pauthtest_personality_disc 0x7EAD
 
 #else
 
diff --git a/libunwind/include/mach-o/compact_unwind_encoding.h 
b/libunwind/include/mach-o/compact_unwind_encoding.h
index c495b83c4..17fad1200 100644
--- a/libunwind/include/mach-o/compact_unwind_encoding.h
+++ b/libunwind/include/mach-o/compact_unwind_encoding.h
@@ -443,8 +443,8 @@ struct unwind_info_section_header_lsda_index_entry
 
 struct unwind_info_regular_second_level_entry
 {
-    uint32_t                     functionOffset;
-    compact_unwind_encoding_t    encoding;
+  uint32_t functionOffset;
+  compact_unwind_encoding_t encoding;
 };
 
 #define UNWIND_SECOND_LEVEL_REGULAR 2
diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index 87314d826..70f576dd1 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -1893,7 +1893,8 @@ public:
     uint64_t value = _registers.__pc;
 #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING)
     // Note the value of the PC was signed to its address in the register state
-    // but everyone else expects it to be signed by the SP, so convert on 
return.
+    // but everyone else expects it to be signed by the SP, so convert on
+    // return.
     value = (uint64_t)ptrauth_auth_and_resign((void *)_registers.__pc,
                                               ptrauth_key_return_address,
                                               &_registers.__pc,
diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp
index ff92c9e0a..ae5c07c2a 100644
--- a/libunwind/src/UnwindCursor.hpp
+++ b/libunwind/src/UnwindCursor.hpp
@@ -1379,7 +1379,6 @@ private:
 #endif
 };
 
-
 template <typename A, typename R>
 UnwindCursor<A, R>::UnwindCursor(unw_context_t *context, A &as)
     : _addressSpace(as), _registers(context), _unwindInfoMissing(false),
@@ -2038,9 +2037,9 @@ bool UnwindCursor<A, 
R>::getInfoFromCompactEncodingSection(
     --personalityIndex; // change 1-based to zero-based index
     if (personalityIndex >= sectionHeader.personalityArrayCount()) {
       _LIBUNWIND_DEBUG_LOG("found encoding 0x%08X with personality index %d, "
-                            "but personality table has only %d entries",
-                            encoding, personalityIndex,
-                            sectionHeader.personalityArrayCount());
+                           "but personality table has only %d entries",
+                           encoding, personalityIndex,
+                           sectionHeader.personalityArrayCount());
       return false;
     }
     int32_t personalityDelta = (int32_t)_addressSpace.get32(
diff --git a/libunwind/src/UnwindLevel1-gcc-ext.c 
b/libunwind/src/UnwindLevel1-gcc-ext.c
index 1764499b3..39a18509c 100644
--- a/libunwind/src/UnwindLevel1-gcc-ext.c
+++ b/libunwind/src/UnwindLevel1-gcc-ext.c
@@ -278,7 +278,6 @@ _LIBUNWIND_EXPORT void __deregister_frame(const void *fde) {
   __unw_remove_dynamic_fde((unw_word_t)(uintptr_t)fde);
 }
 
-
 // The following register/deregister functions are gcc extensions.
 // They have existed on Mac OS X, but have never worked because Mac OS X
 // before 10.6 used keymgr to track known FDEs, but these functions

``````````

</details>


https://github.com/llvm/llvm-project/pull/174565
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to