[Lldb-commits] [PATCH] D48976: Replaced more boilerplate code with CompletionRequest (NFC)

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 5 09:09:03 PDT 2018


teemperor created this revision.
teemperor added a reviewer: jingham.

As suggested in https://reviews.llvm.org/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.


https://reviews.llvm.org/D48976

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48976.154247.patch
Type: text/x-patch
Size: 98014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180705/ff38e3c1/attachment-0001.bin>


More information about the lldb-commits mailing list