Simplify Boolean expressions
This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
This commit is contained in:
@@ -129,13 +129,13 @@ bool ValueObjectPrinter::GetMostSpecializedValue() {
|
||||
}
|
||||
|
||||
if (m_valobj->IsSynthetic()) {
|
||||
if (m_options.m_use_synthetic == false) {
|
||||
if (!m_options.m_use_synthetic) {
|
||||
ValueObject *non_synthetic = m_valobj->GetNonSyntheticValue().get();
|
||||
if (non_synthetic)
|
||||
m_valobj = non_synthetic;
|
||||
}
|
||||
} else {
|
||||
if (m_options.m_use_synthetic == true) {
|
||||
if (m_options.m_use_synthetic) {
|
||||
ValueObject *synthetic = m_valobj->GetSyntheticValue().get();
|
||||
if (synthetic)
|
||||
m_valobj = synthetic;
|
||||
@@ -166,7 +166,7 @@ const char *ValueObjectPrinter::GetRootNameForDisplay(const char *if_fail) {
|
||||
bool ValueObjectPrinter::ShouldPrintValueObject() {
|
||||
if (m_should_print == eLazyBoolCalculate)
|
||||
m_should_print =
|
||||
(m_options.m_flat_output == false || m_type_flags.Test(eTypeHasValue))
|
||||
(!m_options.m_flat_output || m_type_flags.Test(eTypeHasValue))
|
||||
? eLazyBoolYes
|
||||
: eLazyBoolNo;
|
||||
return m_should_print == eLazyBoolYes;
|
||||
@@ -326,7 +326,7 @@ bool ValueObjectPrinter::CheckScopeIfNeeded() {
|
||||
}
|
||||
|
||||
TypeSummaryImpl *ValueObjectPrinter::GetSummaryFormatter(bool null_if_omitted) {
|
||||
if (m_summary_formatter.second == false) {
|
||||
if (!m_summary_formatter.second) {
|
||||
TypeSummaryImpl *entry = m_options.m_summary_sp
|
||||
? m_options.m_summary_sp.get()
|
||||
: m_valobj->GetSummaryFormat().get();
|
||||
@@ -458,7 +458,7 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed,
|
||||
else
|
||||
m_stream->Printf("%s\n", object_desc);
|
||||
return true;
|
||||
} else if (value_printed == false && summary_printed == false)
|
||||
} else if (!value_printed && !summary_printed)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
@@ -625,7 +625,7 @@ bool ValueObjectPrinter::ShouldPrintEmptyBrackets(bool value_printed,
|
||||
if (!IsAggregate())
|
||||
return false;
|
||||
|
||||
if (m_options.m_reveal_empty_aggregates == false) {
|
||||
if (!m_options.m_reveal_empty_aggregates) {
|
||||
if (value_printed || summary_printed)
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user