[Lldb-commits] [lldb] [lldb] Make variant formatter work with libstdc++-14 (PR #97568)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 3 05:30:13 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 2a14c0643597c5932af85f22172c99800f9b4a6c...53b9fda6f7bf0ec4df32869c9d4ba2203aa1870a lldb/examples/synthetic/gnu_libstdcpp.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- examples/synthetic/gnu_libstdcpp.py	2024-07-03 12:20:12.000000 +0000
+++ examples/synthetic/gnu_libstdcpp.py	2024-07-03 12:29:48.148603 +0000
@@ -913,11 +913,11 @@
     index = index_obj.GetValueAsUnsigned(0)
     if index == npos_value:
         return " No Value"
 
     # Strip references and typedefs.
-    variant_type = raw_obj.GetType().GetCanonicalType().GetDereferencedType();
+    variant_type = raw_obj.GetType().GetCanonicalType().GetDereferencedType()
     template_arg_count = variant_type.GetNumberOfTemplateArguments()
 
     # Invalid index can happen when the variant is not initialized yet.
     if index >= template_arg_count:
         return " <Invalid>"
--- test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py	2024-07-03 12:20:12.000000 +0000
+++ test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py	2024-07-03 12:29:48.203440 +0000
@@ -20,20 +20,20 @@
         )
 
         lldbutil.continue_to_breakpoint(self.process, bkpt)
 
         for name in ["v1", "v1_typedef"]:
-          self.expect(
-              "frame variable " + name,
-              substrs=[name + " =  Active Type = int  {", "Value = 12", "}"],
-          )
+            self.expect(
+                "frame variable " + name,
+                substrs=[name + " =  Active Type = int  {", "Value = 12", "}"],
+            )
 
         for name in ["v1_ref", "v1_typedef_ref"]:
-          self.expect(
-              "frame variable " + name,
-              substrs=[name + " =  Active Type = int : {", "Value = 12", "}"],
-          )
+            self.expect(
+                "frame variable " + name,
+                substrs=[name + " =  Active Type = int : {", "Value = 12", "}"],
+            )
 
         self.expect(
             "frame variable v_v1",
             substrs=[
                 "v_v1 =  Active Type = std::variant<int, double, char>  {",

``````````

</details>


https://github.com/llvm/llvm-project/pull/97568


More information about the lldb-commits mailing list