summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp15
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp15
-rw-r--r--lldb/source/Interpreter/OptionGroupVariable.cpp4
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp4
-rw-r--r--lldb/source/Interpreter/Options.cpp6
5 files changed, 20 insertions, 24 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 0ed2d4a1cd3..1072b444707 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -987,16 +987,16 @@ bool CommandInterpreter::AddUserCommand(llvm::StringRef name,
if (!name.empty()) {
// do not allow replacement of internal commands
if (CommandExists(name)) {
- if (can_replace == false)
+ if (!can_replace)
return false;
- if (m_command_dict[name]->IsRemovable() == false)
+ if (!m_command_dict[name]->IsRemovable())
return false;
}
if (UserCommandExists(name)) {
- if (can_replace == false)
+ if (!can_replace)
return false;
- if (m_user_dict[name]->IsRemovable() == false)
+ if (!m_user_dict[name]->IsRemovable())
return false;
}
@@ -2131,7 +2131,7 @@ void CommandInterpreter::SourceInitFile(bool in_cwd,
profilePath.AppendPathComponent(".lldbinit");
std::string init_file_path = profilePath.GetPath();
- if (m_skip_app_init_files == false) {
+ if (!m_skip_app_init_files) {
FileSpec program_file_spec(HostInfo::GetProgramFileSpec());
const char *program_name = program_file_spec.GetFilename().AsCString();
@@ -2769,7 +2769,7 @@ void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler,
return;
const bool is_interactive = io_handler.GetIsInteractive();
- if (is_interactive == false) {
+ if (!is_interactive) {
// When we are not interactive, don't execute blank lines. This will happen
// sourcing a commands file. We don't want blank lines to repeat the
// previous command and cause any errors to occur (like redefining an
@@ -3018,8 +3018,7 @@ CommandInterpreter::ResolveCommandImpl(std::string &command_line,
bool is_alias = GetAliasFullName(next_word, full_name);
cmd_obj = GetCommandObject(next_word, &matches);
bool is_real_command =
- (is_alias == false) ||
- (cmd_obj != nullptr && cmd_obj->IsAlias() == false);
+ (!is_alias) || (cmd_obj != nullptr && !cmd_obj->IsAlias());
if (!is_real_command) {
matches.Clear();
std::string alias_result;
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index 324b0b51122..05c540b37c6 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -409,15 +409,12 @@ const char *CommandObject::GetArgumentName(CommandArgumentType arg_type) {
}
bool CommandObject::IsPairType(ArgumentRepetitionType arg_repeat_type) {
- if ((arg_repeat_type == eArgRepeatPairPlain) ||
- (arg_repeat_type == eArgRepeatPairOptional) ||
- (arg_repeat_type == eArgRepeatPairPlus) ||
- (arg_repeat_type == eArgRepeatPairStar) ||
- (arg_repeat_type == eArgRepeatPairRange) ||
- (arg_repeat_type == eArgRepeatPairRangeOptional))
- return true;
-
- return false;
+ return (arg_repeat_type == eArgRepeatPairPlain) ||
+ (arg_repeat_type == eArgRepeatPairOptional) ||
+ (arg_repeat_type == eArgRepeatPairPlus) ||
+ (arg_repeat_type == eArgRepeatPairStar) ||
+ (arg_repeat_type == eArgRepeatPairRange) ||
+ (arg_repeat_type == eArgRepeatPairRangeOptional);
}
static CommandObject::CommandArgumentEntry
diff --git a/lldb/source/Interpreter/OptionGroupVariable.cpp b/lldb/source/Interpreter/OptionGroupVariable.cpp
index 40be6d7b664..f90212cfcb2 100644
--- a/lldb/source/Interpreter/OptionGroupVariable.cpp
+++ b/lldb/source/Interpreter/OptionGroupVariable.cpp
@@ -55,8 +55,8 @@ static Status ValidateNamedSummary(const char *str, void *) {
if (!str || !str[0])
return Status("must specify a valid named summary");
TypeSummaryImplSP summary_sp;
- if (DataVisualization::NamedSummaryFormats::GetSummaryFormat(
- ConstString(str), summary_sp) == false)
+ if (!DataVisualization::NamedSummaryFormats::GetSummaryFormat(
+ ConstString(str), summary_sp))
return Status("must specify a valid named summary");
return Status();
}
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index 834cd976fb8..327d26b09eb 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -38,7 +38,7 @@ OptionValueProperties::OptionValueProperties(
for (size_t i = 0; i < num_properties; ++i) {
// Duplicate any values that are not global when constructing properties
// from a global copy
- if (m_properties[i].IsGlobal() == false) {
+ if (!m_properties[i].IsGlobal()) {
lldb::OptionValueSP new_value_sp(m_properties[i].GetValue()->DeepCopy());
m_properties[i].SetOptionValue(new_value_sp);
}
@@ -212,7 +212,7 @@ Status OptionValueProperties::SetSubValue(const ExecutionContext *exe_ctx,
else {
// Don't set an error if the path contained .experimental. - those are
// allowed to be missing and should silently fail.
- if (name_contains_experimental == false && error.AsCString() == nullptr) {
+ if (!name_contains_experimental && error.AsCString() == nullptr) {
error.SetErrorStringWithFormat("invalid value path '%s'", name.str().c_str());
}
}
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp
index 3ddb064a879..c6357399a7e 100644
--- a/lldb/source/Interpreter/Options.cpp
+++ b/lldb/source/Interpreter/Options.cpp
@@ -457,7 +457,7 @@ void Options::GenerateOptionUsage(Stream &strm, CommandObject *cmd,
}
}
- if (options.empty() == false) {
+ if (!options.empty()) {
// We have some required options with no arguments
strm.PutCString(" -");
for (i = 0; i < 2; ++i)
@@ -476,14 +476,14 @@ void Options::GenerateOptionUsage(Stream &strm, CommandObject *cmd,
if (def.usage_mask & opt_set_mask && isprint8(def.short_option)) {
// Add current option to the end of out_stream.
- if (def.required == false &&
+ if (!def.required &&
def.option_has_arg == OptionParser::eNoArgument) {
options.insert(def.short_option);
}
}
}
- if (options.empty() == false) {
+ if (!options.empty()) {
// We have some required options with no arguments
strm.PutCString(" [-");
for (i = 0; i < 2; ++i)
OpenPOWER on IntegriCloud