[all-commits] [llvm/llvm-project] 4f7fb1: [lldb] Don't save empty expressions in the multili...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Tue Aug 31 09:51:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f7fb13f87e10bd2cd89ccf2be70b026032237a7
      https://github.com/llvm/llvm-project/commit/4f7fb13f87e10bd2cd89ccf2be70b026032237a7
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M lldb/source/Host/common/Editline.cpp
    M lldb/test/API/commands/expression/multiline-navigation/TestMultilineNavigation.py

  Log Message:
  -----------
  [lldb] Don't save empty expressions in the multiline editor history

Right now running `expr` to start the multiline expression editor and then
pressing enter causes an empty history empty to be created for the multiline
editor. That doesn't seem very useful for users as pressing the 'up' key will
now also bring up these empty expressions.

I don't think there is ever a use case for recalling a completely empty
expression from the history, so instead don't save those entries to the history
file and make sure we never recall them when navigating over the expression
history.

Note: This is actually a Swift downstream patch that got shipped with Apple's
LLDB for many years. However, this recently started conflicting with upstream
LLDB as D100048 added a test that made sure that empty expression entries don't
crash LLDB. Apple's LLDB was never affected by this crash as it never saved
empty expressions in the first place.

Reviewed By: augusto2112

Differential Revision: https://reviews.llvm.org/D108983




More information about the All-commits mailing list