From adcd02683856c30ba6f349279509acecd90063df Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 28 Jan 2020 20:23:46 +0100 Subject: Make llvm::StringRef to std::string conversions explicit. This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up. --- lldb/source/Commands/CommandObjectHelp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectHelp.cpp') diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index 7e984f9..6dc1868 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -107,7 +107,7 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) { // object that corresponds to the help command entered. std::string sub_command; for (auto &entry : command.entries().drop_front()) { - sub_command = entry.ref(); + sub_command = std::string(entry.ref()); matches.Clear(); if (sub_cmd_obj->IsAlias()) sub_cmd_obj = -- cgit v1.1