[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 6 14:30:43 PDT 2023


================
@@ -0,0 +1,26 @@
+"""
+Tests whether the expression command applies FixIts
+"""
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CPP_Expression_FixIt_TestCase(TestBase):
+    def test_with_run_command(self):
+        "Confirm that the `expression` command applies a FixIt " \
+        "and prints it out to the console."
+        
+        self.build()
+        lldbutil.run_to_source_breakpoint(
+            self, "// break here", lldb.SBFileSpec("main.cpp")
+        )
+
+        self.expect(
+            "expr -l c++ -- class C { int i; void f() { []() { ++i; }(); } }",
----------------
adrian-prantl wrote:

the `-l c++` is redundant

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


More information about the lldb-commits mailing list