mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
Add the new Args / entry-access API.
The long-term goal here is to get rid of the functions GetArgumentAtIndex() and GetQuoteCharAtIndex(), instead replacing them with operator based access and range-based for enumeration. There are a lot of callsites, though, so the changes will be done incrementally, starting with this one. Differential Revision: https://reviews.llvm.org/D26883 llvm-svn: 287597
This commit is contained in:
@@ -473,12 +473,12 @@ public:
|
||||
bool &word_complete,
|
||||
StringList &matches) override {
|
||||
// Arguments are the standard source file completer.
|
||||
std::string completion_str(input.GetArgumentAtIndex(cursor_index));
|
||||
completion_str.erase(cursor_char_position);
|
||||
auto completion_str = input[cursor_index].ref;
|
||||
completion_str = completion_str.take_front(cursor_char_position);
|
||||
|
||||
CommandCompletions::InvokeCommonCompletionCallbacks(
|
||||
GetCommandInterpreter(), CommandCompletions::eVariablePathCompletion,
|
||||
completion_str.c_str(), match_start_point, max_return_elements, nullptr,
|
||||
completion_str, match_start_point, max_return_elements, nullptr,
|
||||
word_complete, matches);
|
||||
return matches.GetSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user