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 -- 
libunwind/include/libunwind.h libunwind/src/libunwind.cpp 
libunwind/src/libunwind_ext.h
``````````

: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 9d2ccc4dd..0d77ca968 100644
--- a/libunwind/include/libunwind.h
+++ b/libunwind/include/libunwind.h
@@ -130,7 +130,7 @@ extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) 
LIBUNWIND_AVAIL;
 extern int unw_is_signal_frame(unw_cursor_t *) LIBUNWIND_AVAIL;
 extern int unw_get_proc_name(unw_cursor_t *, char *, size_t, unw_word_t *) 
LIBUNWIND_AVAIL;
 //extern int       unw_get_save_loc(unw_cursor_t*, int, unw_save_loc_t*);
-extern const char *unw_strerror (int) LIBUNWIND_AVAIL;
+extern const char *unw_strerror(int) LIBUNWIND_AVAIL;
 
 extern unw_addr_space_t unw_local_addr_space;
 
diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp
index 23335ba57..2408993f2 100644
--- a/libunwind/src/libunwind.cpp
+++ b/libunwind/src/libunwind.cpp
@@ -351,19 +351,31 @@ void __unw_remove_dynamic_eh_frame_section(unw_word_t 
eh_frame_start) {
 /// Maps the UNW_* error code to a textual representation
 _LIBUNWIND_HIDDEN const char *__unw_strerror(int error_code) {
   switch (error_code) {
-  case UNW_ESUCCESS: return "no error";
-  case UNW_EUNSPEC: return "unspecified (general) error";
-  case UNW_ENOMEM: return "out of memory";
-  case UNW_EBADREG: return "bad register number";
-  case UNW_EREADONLYREG: return "attempt to write read-only register";
-  case UNW_ESTOPUNWIND: return "stop unwinding";
-  case UNW_EINVALIDIP: return "invalid IP";
-  case UNW_EBADFRAME: return "bad frame";
-  case UNW_EINVAL: return "unsupported operation or bad value";
-  case UNW_EBADVERSION: return "unwind info has unsupported version";
-  case UNW_ENOINFO: return "no unwind info found";
+  case UNW_ESUCCESS:
+    return "no error";
+  case UNW_EUNSPEC:
+    return "unspecified (general) error";
+  case UNW_ENOMEM:
+    return "out of memory";
+  case UNW_EBADREG:
+    return "bad register number";
+  case UNW_EREADONLYREG:
+    return "attempt to write read-only register";
+  case UNW_ESTOPUNWIND:
+    return "stop unwinding";
+  case UNW_EINVALIDIP:
+    return "invalid IP";
+  case UNW_EBADFRAME:
+    return "bad frame";
+  case UNW_EINVAL:
+    return "unsupported operation or bad value";
+  case UNW_EBADVERSION:
+    return "unwind info has unsupported version";
+  case UNW_ENOINFO:
+    return "no unwind info found";
 #if defined(_LIBUNWIND_TARGET_AARCH64) && !defined(_LIBUNWIND_IS_NATIVE_ONLY)
-  case UNW_ECROSSRASIGNING: return "return address require authentication";
+  case UNW_ECROSSRASIGNING:
+    return "return address require authentication";
 #endif
   }
   return "invalid error code";

``````````

</details>


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

Reply via email to