summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 46f12d8685b..79003d324c6 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -294,7 +294,7 @@ CommandObjectExpression::~CommandObjectExpression() = default;
Options *CommandObjectExpression::GetOptions() { return &m_option_group; }
-int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
+void CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
EvaluateExpressionOptions options;
options.SetCoerceToId(m_varobj_options.use_objc);
options.SetLanguage(m_command_options.language);
@@ -311,7 +311,7 @@ int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
// This didn't work, so let's get out before we start doing things that
// expect a valid frame pointer.
if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr)
- return 0;
+ return;
ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
@@ -321,7 +321,7 @@ int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
target = GetDummyTarget();
if (!target)
- return 0;
+ return;
unsigned cursor_pos = request.GetRawCursorPos();
llvm::StringRef code = request.GetRawLine();
@@ -341,7 +341,7 @@ int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
// exit.
// FIXME: We should complete the options here.
if (cursor_pos < raw_start)
- return 0;
+ return;
// Make the cursor_pos again relative to the start of the code string.
assert(cursor_pos >= raw_start);
@@ -354,10 +354,9 @@ int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
code, llvm::StringRef(), language, UserExpression::eResultTypeAny,
options, nullptr, error));
if (error.Fail())
- return 0;
+ return;
expr->Complete(exe_ctx, request, cursor_pos);
- return request.GetNumberOfMatches();
}
static lldb_private::Status
OpenPOWER on IntegriCloud