diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-31 03:26:10 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-31 03:26:10 +0000 |
commit | 175f0930907c56a80e0500cd201910c36222e788 (patch) | |
tree | dc3e71279bcd2a9f9e6c7d32e21916ecd04783e8 /lldb/source/Core/IOHandler.cpp | |
parent | e825b834ecbd322db137ae8b69b6450282846ee8 (diff) | |
download | bcm5719-llvm-175f0930907c56a80e0500cd201910c36222e788.tar.gz bcm5719-llvm-175f0930907c56a80e0500cd201910c36222e788.zip |
[StringList] Change LongestCommonPrefix API
When investigating a completion bug I got confused by the API.
LongestCommonPrefix finds the longest common prefix of the strings in
the string list. Instead of returning that string through an output
argument, just return it by value.
llvm-svn: 367384
Diffstat (limited to 'lldb/source/Core/IOHandler.cpp')
-rw-r--r-- | lldb/source/Core/IOHandler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 203b9e8af07..51cae59639f 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -243,8 +243,7 @@ int IOHandlerDelegate::IOHandlerComplete( size_t num_matches = request.GetNumberOfMatches(); if (num_matches > 0) { - std::string common_prefix; - matches.LongestCommonPrefix(common_prefix); + std::string common_prefix = matches.LongestCommonPrefix(); const size_t partial_name_len = request.GetCursorArgumentPrefix().size(); // If we matched a unique single command, add a space... Only do this if |