summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/DWARFExpression.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-12-15 00:15:33 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-12-15 00:15:33 +0000
commita6682a413d893bc1ed6190dfadcee806155da66e (patch)
tree326b3a6e484e3a3a3a5087663e1284f9b594f2a8 /lldb/source/Expression/DWARFExpression.cpp
parent9d1827331f3f9582fa2ed05913ae4301f2604a19 (diff)
downloadbcm5719-llvm-a6682a413d893bc1ed6190dfadcee806155da66e.tar.gz
bcm5719-llvm-a6682a413d893bc1ed6190dfadcee806155da66e.zip
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
Diffstat (limited to 'lldb/source/Expression/DWARFExpression.cpp')
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index 310eb79de87..a6249b3a286 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1839,7 +1839,7 @@ bool DWARFExpression::Evaluate(
error_ptr->SetErrorString(
"Expression stack needs at least 1 item for DW_OP_abs.");
return false;
- } else if (stack.back().ResolveValue(exe_ctx).AbsoluteValue() == false) {
+ } else if (!stack.back().ResolveValue(exe_ctx).AbsoluteValue()) {
if (error_ptr)
error_ptr->SetErrorString(
"Failed to take the absolute value of the first stack item.");
@@ -1972,7 +1972,7 @@ bool DWARFExpression::Evaluate(
"Expression stack needs at least 1 item for DW_OP_neg.");
return false;
} else {
- if (stack.back().ResolveValue(exe_ctx).UnaryNegate() == false) {
+ if (!stack.back().ResolveValue(exe_ctx).UnaryNegate()) {
if (error_ptr)
error_ptr->SetErrorString("Unary negate failed.");
return false;
@@ -1993,7 +1993,7 @@ bool DWARFExpression::Evaluate(
"Expression stack needs at least 1 item for DW_OP_not.");
return false;
} else {
- if (stack.back().ResolveValue(exe_ctx).OnesComplement() == false) {
+ if (!stack.back().ResolveValue(exe_ctx).OnesComplement()) {
if (error_ptr)
error_ptr->SetErrorString("Logical NOT failed.");
return false;
@@ -2100,8 +2100,8 @@ bool DWARFExpression::Evaluate(
} else {
tmp = stack.back();
stack.pop_back();
- if (stack.back().ResolveValue(exe_ctx).ShiftRightLogical(
- tmp.ResolveValue(exe_ctx)) == false) {
+ if (!stack.back().ResolveValue(exe_ctx).ShiftRightLogical(
+ tmp.ResolveValue(exe_ctx))) {
if (error_ptr)
error_ptr->SetErrorString("DW_OP_shr failed.");
return false;
OpenPOWER on IntegriCloud