summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectApropos.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-02-19 19:33:46 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-02-19 19:33:46 +0000
commitc8ecc2a9fa3c100ae1c8c3e9ce4a5db452a69206 (patch)
tree5579bb86fde482839910a24c5eab7e2cd47f0d73 /lldb/source/Commands/CommandObjectApropos.cpp
parent28cbb8616e2764340d4c583ba531e3391346025e (diff)
downloadbcm5719-llvm-c8ecc2a9fa3c100ae1c8c3e9ce4a5db452a69206.tar.gz
bcm5719-llvm-c8ecc2a9fa3c100ae1c8c3e9ce4a5db452a69206.zip
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261356
Diffstat (limited to 'lldb/source/Commands/CommandObjectApropos.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectApropos.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/lldb/source/Commands/CommandObjectApropos.cpp b/lldb/source/Commands/CommandObjectApropos.cpp
index 47890b1e83b..bf441c09af4 100644
--- a/lldb/source/Commands/CommandObjectApropos.cpp
+++ b/lldb/source/Commands/CommandObjectApropos.cpp
@@ -7,16 +7,14 @@
//
//===----------------------------------------------------------------------===//
-#include "CommandObjectApropos.h"
-
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "CommandObjectApropos.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Interpreter/Property.h"
-
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
@@ -28,10 +26,10 @@ using namespace lldb_private;
//-------------------------------------------------------------------------
CommandObjectApropos::CommandObjectApropos (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "apropos",
- "Find a list of debugger commands related to a particular word/subject.",
- NULL)
+ CommandObjectParsed(interpreter,
+ "apropos",
+ "Find a list of debugger commands related to a particular word/subject.",
+ nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData search_word_arg;
@@ -47,10 +45,7 @@ CommandObjectApropos::CommandObjectApropos (CommandInterpreter &interpreter) :
m_arguments.push_back (arg);
}
-CommandObjectApropos::~CommandObjectApropos()
-{
-}
-
+CommandObjectApropos::~CommandObjectApropos() = default;
bool
CommandObjectApropos::DoExecute (Args& args, CommandReturnObject &result)
@@ -60,7 +55,7 @@ CommandObjectApropos::DoExecute (Args& args, CommandReturnObject &result)
if (argc == 1)
{
const char *search_word = args.GetArgumentAtIndex(0);
- if ((search_word != NULL)
+ if ((search_word != nullptr)
&& (strlen (search_word) > 0))
{
// The bulk of the work must be done inside the Command Interpreter, since the command dictionary
@@ -120,10 +115,8 @@ CommandObjectApropos::DoExecute (Args& args, CommandReturnObject &result)
user_commands_help.GetStringAtIndex(i),
max_len);
}
-
}
-
std::vector<const Property *> properties;
const size_t num_properties = m_interpreter.GetDebugger().Apropos(search_word, properties);
if (num_properties)
OpenPOWER on IntegriCloud