[all-commits] [llvm/llvm-project] 606f89: [lldb] Fix `po` alias by printing fix-its to the c...

Pete Lawrence via All-commits all-commits at lists.llvm.org
Tue Oct 10 14:00:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 606f89ab7d537ca068fb1be9fd89d96a30de38f8
      https://github.com/llvm/llvm-project/commit/606f89ab7d537ca068fb1be9fd89d96a30de38f8
  Author: Pete Lawrence <34425917+PortalPete at users.noreply.github.com>
  Date:   2023-10-10 (Tue, 10 Oct 2023)

  Changed paths:
    M lldb/source/Commands/CommandObjectDWIMPrint.cpp
    M lldb/source/Commands/CommandObjectExpression.cpp
    A lldb/test/API/lang/cpp/dwim-print-fixit/Makefile
    A lldb/test/API/lang/cpp/dwim-print-fixit/TestCppDWIMPrintFixIt.py
    A lldb/test/API/lang/cpp/dwim-print-fixit/main.cpp
    A lldb/test/API/lang/cpp/expression-fixit/Makefile
    A lldb/test/API/lang/cpp/expression-fixit/TestCppExpressionFixIt.py
    A lldb/test/API/lang/cpp/expression-fixit/main.cpp

  Log Message:
  -----------
  [lldb] Fix `po` alias by printing fix-its to the console. (#68452)

The `po` alias now matches the behavior of the `expression` command when
the it can apply a Fix-It to an expression.
Modifications

- Add has `m_fixed_expression` to the `CommandObjectDWIMPrint` class a
`protected` member that stores the post Fix-It expression, just like the
`CommandObjectExpression` class.
- Converted messages to present tense.
- Add test cases that confirms a Fix-It for a C++ expression for both
`po` and `expressions`

rdar://115317419

Co-authored-by: Pete Lawrence <plawrence at apple.com>




More information about the All-commits mailing list