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 -- 
lldb/source/Commands/CommandObjectRegister.cpp 
lldb/source/Core/DumpRegisterValue.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/lldb/source/Commands/CommandObjectRegister.cpp 
b/lldb/source/Commands/CommandObjectRegister.cpp
index 404c80004..7f1f47379 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -85,9 +85,9 @@ public:
     bool prefix_with_altname = (bool)m_command_options.alternate_name;
     bool prefix_with_name = !prefix_with_altname;
     DumpRegisterValue(reg_value, strm, reg_info, prefix_with_name,
-                      prefix_with_altname, m_format_options.GetFormat(), 
reg_name_align_at,
-                      exe_ctx.GetBestExecutionContextScope(), print_flags,
-                      exe_ctx.GetTargetSP());
+                      prefix_with_altname, m_format_options.GetFormat(),
+                      reg_name_align_at, 
exe_ctx.GetBestExecutionContextScope(),
+                      print_flags, exe_ctx.GetTargetSP());
     if ((reg_info.encoding == eEncodingUint) ||
         (reg_info.encoding == eEncodingSint)) {
       Process *process = exe_ctx.GetProcessPtr();
@@ -123,7 +123,8 @@ public:
       strm.Printf("%s:\n", (reg_set->name ? reg_set->name : "unknown"));
       strm.IndentMore();
       const size_t num_registers = reg_set->num_registers;
-      uint32_t reg_name_align_at = ComputeMatchingAlignment(reg_ctx, reg_set, 
primitive_only);
+      uint32_t reg_name_align_at =
+          ComputeMatchingAlignment(reg_ctx, reg_set, primitive_only);
       for (size_t reg_idx = 0; reg_idx < num_registers; ++reg_idx) {
         const uint32_t reg = reg_set->registers[reg_idx];
         const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg);
@@ -148,18 +149,21 @@ public:
   }
 
 protected:
-  uint32_t ComputeMatchingAlignment(RegisterContext *reg_ctx, const 
RegisterSet *const reg_set, bool primitive_only) {
-    bool use_primary_name = 
!static_cast<bool>(m_command_options.alternate_name);
+  uint32_t ComputeMatchingAlignment(RegisterContext *reg_ctx,
+                                    const RegisterSet *const reg_set,
+                                    bool primitive_only) {
+    bool use_primary_name =
+        !static_cast<bool>(m_command_options.alternate_name);
     const size_t num_registers = reg_set->num_registers;
     uint32_t reg_name_align_at = 0;
 
-    auto getNameSize = [&](auto reg_info){ 
+    auto getNameSize = [&](auto reg_info) {
       auto raw = use_primary_name ? reg_info->name : reg_info->alt_name;
       auto str = raw ? std::string(raw) : std::string();
       return static_cast<uint32_t>(str.size());
     };
 
-    // Loop through all the registers to find the longest register name for 
the 
+    // Loop through all the registers to find the longest register name for the
     // matching alignment
     for (size_t reg_idx = 0; reg_idx < num_registers; ++reg_idx) {
       const uint32_t reg = reg_set->registers[reg_idx];

``````````

</details>


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

Reply via email to