[all-commits] [llvm/llvm-project] 2bcff2: [lldb] Set result error state in 'frame variable'

Dave Lee via All-commits all-commits at lists.llvm.org
Sun Jan 9 13:27:03 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bcff220bf1e372e91491911fe0bb76c4c4bbef8
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2022-01-09 (Sun, 09 Jan 2022)

  Changed paths:
    M lldb/source/Commands/CommandObjectFrame.cpp
    M lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py

  Log Message:
  [lldb] Set result error state in 'frame variable'

Ensure that errors in `frame variable` are reflected in result object.

The statistics for `frame variable` show invocations as being successful, even
when executing one of the error paths.

This change replaces `result.GetErrorStream()` with `result.AppendError()`,
which also sets the status to `eReturnStatusFailed`.

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

(cherry picked from commit 2c7d10c41278181e3e45c68f28b501cd95193a8a)

More information about the All-commits mailing list