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
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 96a1716..b0dd04a 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -214,7 +214,7 @@
 
       if (first_update)
         SetValueDidChange(false);
-      else if (!m_value_did_change && success == false) {
+      else if (!m_value_did_change && !success) {
         // The value wasn't gotten successfully, so we mark this as changed if
         // the value used to be valid and now isn't
         SetValueDidChange(value_was_valid);
@@ -442,10 +442,7 @@
   }
 
   bool ret;
-  if (scalar_value.ULongLong(1) == 0)
-    ret = false;
-  else
-    ret = true;
+  ret = scalar_value.ULongLong(1) != 0;
   error.Clear();
   return ret;
 }
@@ -639,7 +636,7 @@
   bool child_is_deref_of_parent = false;
   uint64_t language_flags = 0;
 
-  const bool transparent_pointers = synthetic_array_member == false;
+  const bool transparent_pointers = !synthetic_array_member;
   CompilerType child_compiler_type;
 
   ExecutionContext exe_ctx(GetExecutionContextRef());
@@ -1921,11 +1918,11 @@
 }
 
 void ValueObject::CalculateSyntheticValue(bool use_synthetic) {
-  if (use_synthetic == false)
+  if (!use_synthetic)
     return;
 
   TargetSP target_sp(GetTargetSP());
-  if (target_sp && target_sp->GetEnableSyntheticValue() == false) {
+  if (target_sp && !target_sp->GetEnableSyntheticValue()) {
     m_synthetic_value = NULL;
     return;
   }
@@ -1976,7 +1973,7 @@
 lldb::ValueObjectSP ValueObject::GetNonSyntheticValue() { return GetSP(); }
 
 ValueObjectSP ValueObject::GetSyntheticValue(bool use_synthetic) {
-  if (use_synthetic == false)
+  if (!use_synthetic)
     return ValueObjectSP();
 
   CalculateSyntheticValue(use_synthetic);
@@ -1995,10 +1992,7 @@
 
   CalculateSyntheticValue(true);
 
-  if (m_synthetic_value)
-    return true;
-  else
-    return false;
+  return m_synthetic_value != nullptr;
 }
 
 bool ValueObject::GetBaseClassPath(Stream &s) {
@@ -3195,7 +3189,7 @@
 ValueObject::FollowParentChain(std::function<bool(ValueObject *)> f) {
   ValueObject *vo = this;
   while (vo) {
-    if (f(vo) == false)
+    if (!f(vo))
       break;
     vo = vo->m_parent;
   }
@@ -3264,8 +3258,7 @@
   // board debugging scenarios have no notion of types, but still manage to
   // have raw numeric values for things like registers. sigh.
   const CompilerType &type(GetCompilerType());
-  return (false == type.IsValid()) ||
-         (0 != (type.GetTypeInfo() & eTypeHasValue));
+  return (!type.IsValid()) || (0 != (type.GetTypeInfo() & eTypeHasValue));
 }
 
 bool ValueObject::IsChecksumEmpty() { return m_value_checksum.empty(); }