aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-07-26 19:03:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-07-26 19:04:23 +0000
commit7fa27ce4a07f19b07799a767fc29416f3b625afb (patch)
tree27825c83636c4de341eb09a74f49f5d38a15d165 /lldb/source/Commands/CommandObjectMultiword.cpp
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index bae2717ffe68..7ef829afaab6 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -274,10 +274,10 @@ void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) {
StringList new_matches;
CommandObject *sub_command_object = GetSubcommandObject(arg0, &new_matches);
- if (sub_command_object == nullptr) {
- request.AddCompletions(new_matches);
+
+ // The subcommand is ambiguous. The completion isn't meaningful.
+ if (!sub_command_object)
return;
- }
// Remove the one match that we got from calling GetSubcommandObject.
new_matches.DeleteStringAtIndex(0);