From 03c9f3642af61f089977ab7a683ad5a2405c67f8 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 14 Nov 2016 23:23:31 +0000 Subject: [PATCH] Fix some StringRef Printf warnings. llvm-svn: 286906 --- lldb/source/Commands/CommandObjectMultiword.cpp | 2 +- lldb/source/Interpreter/CommandInterpreter.cpp | 2 +- lldb/source/Interpreter/CommandObject.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp index bcc0229ab5de..d31bba466952 100644 --- a/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/lldb/source/Commands/CommandObjectMultiword.cpp @@ -257,7 +257,7 @@ void CommandObjectMultiword::AproposAllSubCommands(llvm::StringRef prefix, CommandObject *sub_cmd_obj = pos->second.get(); StreamString complete_command_name; - complete_command_name.Printf("%s %s", prefix, command_name); + complete_command_name << prefix << " " << command_name; if (sub_cmd_obj->HelpTextContainsWord(search_word)) { commands_found.AppendString(complete_command_name.GetData()); diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 2243316232bb..8614bdae64e8 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -2245,7 +2245,7 @@ void CommandInterpreter::HandleCommands(const StringList &commands, if (options.GetPrintResults()) { if (tmp_result.Succeeded()) - result.AppendMessageWithFormat("%s", tmp_result.GetOutputData()); + result.AppendMessage(tmp_result.GetOutputData()); } if (!success || !tmp_result.Succeeded()) { diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index c9337a5c9f6c..a7f590fd268e 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -862,7 +862,7 @@ void CommandObject::GenerateHelpText(Stream &output_strm) { 1); } else interpreter.OutputFormattedHelpText(output_strm, "", "", GetHelp(), 1); - output_strm.Printf("\nSyntax: %s\n", GetSyntax()); + output_strm << "\nSyntax: " << GetSyntax() << "\n"; Options *options = GetOptions(); if (options != nullptr) { options->GenerateOptionUsage(