diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-25 12:40:01 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-25 12:40:01 +0000 |
commit | 823fd9508ad4b47ee1d8a5a9dae5fada01e11e29 (patch) | |
tree | 23b45682b73209a6020502e35c046b41bd7d2078 /lldb/source/Commands/CommandObjectMultiword.cpp | |
parent | b9683d3c53d6043d7cbeabf451860c027557be96 (diff) | |
download | llvm-823fd9508ad4b47ee1d8a5a9dae5fada01e11e29.zip llvm-823fd9508ad4b47ee1d8a5a9dae5fada01e11e29.tar.gz llvm-823fd9508ad4b47ee1d8a5a9dae5fada01e11e29.tar.bz2 |
[lldb][NFC] Add CompletionRequest::AppendEmptyArgument
This is the only legitimate use we currently have for modifying
a CompletionRequest. Add a utility function for this purpose
and remove the remaining setters which go against the idea of
having an immutable CompletionRequest.
llvm-svn: 372858
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMultiword.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp index e06c733..c0f5d67 100644 --- a/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/lldb/source/Commands/CommandObjectMultiword.cpp @@ -195,8 +195,7 @@ void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) { if (cmd_obj != nullptr) { if (request.GetParsedLine().GetArgumentCount() != 1) { request.GetParsedLine().Shift(); - request.SetCursorCharPosition(0); - request.GetParsedLine().AppendArgument(llvm::StringRef()); + request.AppendEmptyArgument(); cmd_obj->HandleCompletion(request); } } |