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/Expression/DWARFExpression.cpp 
lldb/unittests/Expression/DWARFExpressionTest.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/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index c04fcc34b..4207794b5 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1298,21 +1298,18 @@ static llvm::Error 
CheckScalarOperandsHaveSameType(const Scalar &lhs,
   // pieces of base-type information used by the evaluator: kind, size, and
   // integer signedness.
   if (lhs.GetType() != rhs.GetType())
-    return llvm::createStringError(
-        "%s requires operands to have the same type",
-        DW_OP_value_to_name(opcode));
+    return llvm::createStringError("%s requires operands to have the same 
type",
+                                   DW_OP_value_to_name(opcode));
 
   if (lhs.GetByteSize() != rhs.GetByteSize())
-    return llvm::createStringError(
-        "%s requires operands to have the same type",
-        DW_OP_value_to_name(opcode));
+    return llvm::createStringError("%s requires operands to have the same 
type",
+                                   DW_OP_value_to_name(opcode));
 
   // Floating scalars do not have integer signedness, so only compare
   // signedness after establishing that both operands are integers.
   if (lhs.GetType() == Scalar::e_int && lhs.IsSigned() != rhs.IsSigned())
-    return llvm::createStringError(
-        "%s requires operands to have the same type",
-        DW_OP_value_to_name(opcode));
+    return llvm::createStringError("%s requires operands to have the same 
type",
+                                   DW_OP_value_to_name(opcode));
 
   return llvm::Error::success();
 }
diff --git a/lldb/unittests/Expression/DWARFExpressionTest.cpp 
b/lldb/unittests/Expression/DWARFExpressionTest.cpp
index ddbbdc917..70b5ed5f3 100644
--- a/lldb/unittests/Expression/DWARFExpressionTest.cpp
+++ b/lldb/unittests/Expression/DWARFExpressionTest.cpp
@@ -602,16 +602,22 @@ TEST(DWARFExpression, 
TypedBinaryOpsRejectMismatchedTypes) {
 
   TypedDwarfDelegate unit;
   constexpr uint8_t opcodes[] = {
-      DW_OP_plus, DW_OP_minus, DW_OP_div, DW_OP_mod, DW_OP_and, DW_OP_or,
+      DW_OP_plus, DW_OP_minus, DW_OP_div, DW_OP_mod,  DW_OP_and, DW_OP_or,
       DW_OP_xor,  DW_OP_shl,   DW_OP_shr, DW_OP_shra, DW_OP_lt,  DW_OP_le,
       DW_OP_gt,   DW_OP_ge,    DW_OP_eq,  DW_OP_ne,
   };
 
   for (uint8_t opcode : opcodes) {
-    std::vector<uint8_t> expr = {
-        DW_OP_constu, 0xff, 0x01, DW_OP_convert,
-        TypedDwarfDelegate::UnsignedChar, DW_OP_lit1, DW_OP_convert,
-        TypedDwarfDelegate::UnsignedShort, opcode, DW_OP_stack_value};
+    std::vector<uint8_t> expr = {DW_OP_constu,
+                                 0xff,
+                                 0x01,
+                                 DW_OP_convert,
+                                 TypedDwarfDelegate::UnsignedChar,
+                                 DW_OP_lit1,
+                                 DW_OP_convert,
+                                 TypedDwarfDelegate::UnsignedShort,
+                                 opcode,
+                                 DW_OP_stack_value};
     EXPECT_THAT_EXPECTED(Evaluate(expr, {}, &unit), llvm::Failed())
         << "opcode 0x" << llvm::utohexstr(opcode);
   }

``````````

</details>


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

Reply via email to