From 771ef6d4f15452d76387cd66552a38122be60925 Mon Sep 17 00:00:00 2001 From: Malcolm Parsons Date: Wed, 2 Nov 2016 20:34:10 +0000 Subject: Fix Clang-tidy readability-redundant-string-cstr warnings Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855 --- lldb/source/Commands/CommandObjectCommands.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 3df7fb75627..ee7add911ae 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -635,7 +635,7 @@ protected: } // Verify that the command is alias-able. - if (m_interpreter.CommandExists(alias_command.c_str())) { + if (m_interpreter.CommandExists(alias_command)) { result.AppendErrorWithFormat( "'%s' is a permanent debugger command and cannot be redefined.\n", alias_command.c_str()); @@ -728,7 +728,7 @@ protected: // Verify that the command is alias'able, and get the appropriate command // object. - if (m_interpreter.CommandExists(alias_command.c_str())) { + if (m_interpreter.CommandExists(alias_command)) { result.AppendErrorWithFormat( "'%s' is a permanent debugger command and cannot be redefined.\n", alias_command.c_str()); @@ -780,17 +780,17 @@ protected: args.GetCommandString(args_string); } - if (m_interpreter.AliasExists(alias_command.c_str()) || - m_interpreter.UserCommandExists(alias_command.c_str())) { + if (m_interpreter.AliasExists(alias_command) || + m_interpreter.UserCommandExists(alias_command)) { result.AppendWarningWithFormat( "Overwriting existing definition for '%s'.\n", alias_command.c_str()); } if (CommandAlias *alias = m_interpreter.AddAlias( - alias_command.c_str(), + alias_command, use_subcommand ? subcommand_obj_sp : command_obj_sp, - args_string.c_str())) { + args_string)) { if (m_command_options.m_help.OptionWasSet()) alias->SetHelp(m_command_options.m_help.GetCurrentValue()); if (m_command_options.m_long_help.OptionWasSet()) @@ -1713,7 +1713,7 @@ protected: // everything should be fine now, let's add this alias CommandObjectSP command_obj_sp(new CommandObjectPythonFunction( - m_interpreter, m_cmd_name, funct_name_str.c_str(), m_short_help, + m_interpreter, m_cmd_name, funct_name_str, m_short_help, m_synchronicity)); if (!m_interpreter.AddUserCommand(m_cmd_name, command_obj_sp, -- cgit v1.2.3