From d6a24757876e7c1d29113f41ea241db262d9609c Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 22 Nov 2016 17:10:15 +0000 Subject: Re-add "demonstrate new Args API" This fixes the build breakage due to the use of C++14. llvm-svn: 287647 --- lldb/source/Commands/CommandObjectFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectFrame.cpp') diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 56e2cc9..74de945 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -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(); } -- cgit v1.1