summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 379251b0276..2bc41621af5 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1857,8 +1857,7 @@ int CommandInterpreter::HandleCompletion(
// element 0, otherwise put an empty string in element 0.
std::string command_partial_str = request.GetCursorArgumentPrefix().str();
- std::string common_prefix;
- matches.LongestCommonPrefix(common_prefix);
+ std::string common_prefix = matches.LongestCommonPrefix();
const size_t partial_name_len = command_partial_str.size();
common_prefix.erase(0, partial_name_len);
OpenPOWER on IntegriCloud