Replaced more boilerplate code with CompletionRequest (NFC)
authorRaphael Isemann <teemperor@gmail.com>
Fri, 13 Jul 2018 18:28:14 +0000 (18:28 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Fri, 13 Jul 2018 18:28:14 +0000 (18:28 +0000)
commita2e76c0bfc5bec8d50e8d13f71b72a66eaa0a386
tree55563c896d181a4de6dc254f335c10a379e0eac0
parentd6c062bce1e499f52500cc759a7c0846dd178cda
Replaced more boilerplate code with CompletionRequest (NFC)

Summary:
As suggested in D48796, this patch replaces even more internal calls that were using the old
completion API style with a single CompletionRequest. In some cases we also pass an option
vector/index, but as we don't always have this information, it currently is not part of the
CompletionRequest class.

The constructor of the CompletionRequest is now also more sensible. You only pass the
user input, cursor position and your list of matches to the request and the rest will be
inferred (using the same code we used before to calculate this). You also have to pass these
match window parameters to it, even though they are unused right now.

The patch shouldn't change any behavior.

Reviewers: jingham

Reviewed By: jingham

Subscribers: lldb-commits

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

llvm-svn: 337031
38 files changed:
lldb/include/lldb/Core/FormatEntity.h
lldb/include/lldb/Interpreter/CommandCompletions.h
lldb/include/lldb/Interpreter/OptionValue.h
lldb/include/lldb/Interpreter/OptionValueArch.h
lldb/include/lldb/Interpreter/OptionValueBoolean.h
lldb/include/lldb/Interpreter/OptionValueEnumeration.h
lldb/include/lldb/Interpreter/OptionValueFileSpec.h
lldb/include/lldb/Interpreter/OptionValueFormatEntity.h
lldb/include/lldb/Interpreter/OptionValueUUID.h
lldb/include/lldb/Interpreter/Options.h
lldb/include/lldb/Symbol/Variable.h
lldb/include/lldb/Utility/ArchSpec.h
lldb/include/lldb/Utility/CompletionRequest.h
lldb/source/Commands/CommandCompletions.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectPlugin.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectSettings.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Core/FormatEntity.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/CommandObjectRegexCommand.cpp
lldb/source/Interpreter/OptionValue.cpp
lldb/source/Interpreter/OptionValueArch.cpp
lldb/source/Interpreter/OptionValueBoolean.cpp
lldb/source/Interpreter/OptionValueEnumeration.cpp
lldb/source/Interpreter/OptionValueFileSpec.cpp
lldb/source/Interpreter/OptionValueFormatEntity.cpp
lldb/source/Interpreter/OptionValueUUID.cpp
lldb/source/Interpreter/Options.cpp
lldb/source/Symbol/Variable.cpp
lldb/source/Utility/ArchSpec.cpp
lldb/source/Utility/CompletionRequest.cpp
lldb/unittests/Utility/CompletionRequestTest.cpp