[Lldb-commits] [lldb] r286906 - Fix some StringRef Printf warnings.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 14 15:23:31 PST 2016
Author: zturner
Date: Mon Nov 14 17:23:31 2016
New Revision: 286906
URL: http://llvm.org/viewvc/llvm-project?rev=286906&view=rev
Log:
Fix some StringRef Printf warnings.
Modified:
lldb/trunk/source/Commands/CommandObjectMultiword.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=286906&r1=286905&r2=286906&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Mon Nov 14 17:23:31 2016
@@ -257,7 +257,7 @@ void CommandObjectMultiword::AproposAllS
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());
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=286906&r1=286905&r2=286906&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Nov 14 17:23:31 2016
@@ -2245,7 +2245,7 @@ void CommandInterpreter::HandleCommands(
if (options.GetPrintResults()) {
if (tmp_result.Succeeded())
- result.AppendMessageWithFormat("%s", tmp_result.GetOutputData());
+ result.AppendMessage(tmp_result.GetOutputData());
}
if (!success || !tmp_result.Succeeded()) {
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=286906&r1=286905&r2=286906&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Mon Nov 14 17:23:31 2016
@@ -862,7 +862,7 @@ void CommandObject::GenerateHelpText(Str
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(
More information about the lldb-commits
mailing list