diff options
author | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2024-02-19 18:19:36 -0800 |
---|---|---|
committer | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2024-02-19 18:19:59 -0800 |
commit | 9ed8b272c30a01c450616f0ed8b2373d5d618ebb (patch) | |
tree | 767aa897f69692523a196a128d954ba408482708 /lldb/source/Interpreter/CommandObject.cpp | |
parent | 744616b3aebd008a5ad0e9de9f82f5e284440ab1 (diff) | |
download | llvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.zip llvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.tar.gz llvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.tar.bz2 |
Revert "Centralize the handling of completion for simple argument lists. (#82085)"
This reverts commit 21631494b068d9364b8dc8f18e59adee9131a0a5.
Reverted because of greendragon failure:
******************** TEST 'lldb-api :: functionalities/completion/TestCompletion.py' FAILED ********************
Script:
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 93c53e8..6ed0fd1 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -305,43 +305,6 @@ void CommandObject::HandleCompletion(CompletionRequest &request) { } } -void CommandObject::HandleArgumentCompletion( - CompletionRequest &request, OptionElementVector &opt_element_vector) { - size_t num_arg_entries = GetNumArgumentEntries(); - if (num_arg_entries != 1) - return; - - CommandArgumentEntry *entry_ptr = GetArgumentEntryAtIndex(0); - if (!entry_ptr) { - assert(entry_ptr && "We said there was one entry, but there wasn't."); - return; // Not worth crashing if asserts are off... - } - - CommandArgumentEntry &entry = *entry_ptr; - // For now, we only handle the simple case of one homogenous argument type. - if (entry.size() != 1) - return; - - // Look up the completion type, and if it has one, invoke it: - const CommandObject::ArgumentTableEntry *arg_entry = - FindArgumentDataByType(entry[0].arg_type); - const ArgumentRepetitionType repeat = entry[0].arg_repetition; - - if (arg_entry == nullptr || arg_entry->completion_type == lldb::eNoCompletion) - return; - - // FIXME: This should be handled higher in the Command Parser. - // Check the case where this command only takes one argument, and don't do - // the completion if we aren't on the first entry: - if (repeat == eArgRepeatPlain && request.GetCursorIndex() != 0) - return; - - lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks( - GetCommandInterpreter(), arg_entry->completion_type, request, nullptr); - -} - - bool CommandObject::HelpTextContainsWord(llvm::StringRef search_word, bool search_short_help, bool search_long_help, |