summaryrefslogtreecommitdiff
path: root/src/ir/utils.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-05-01 14:48:41 -0700
committerGitHub <noreply@github.com>2019-05-01 14:48:41 -0700
commit2bd3758a22131cfd6925b3fd995657b211095c90 (patch)
tree2a38a48ab68c00ed1b55e885f86014bbdda92ff2 /src/ir/utils.h
parent73709b4da08d285c2237c8c23a54ba53274c0c7f (diff)
downloadbinaryen-2bd3758a22131cfd6925b3fd995657b211095c90.tar.gz
binaryen-2bd3758a22131cfd6925b3fd995657b211095c90.tar.bz2
binaryen-2bd3758a22131cfd6925b3fd995657b211095c90.zip
clang-tidy braces changes (#2075)
Applies the changes in #2065, and temprarily disables the hook since it's too slow to run on a change this large. We should re-enable it in a later commit.
Diffstat (limited to 'src/ir/utils.h')
-rw-r--r--src/ir/utils.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ir/utils.h b/src/ir/utils.h
index 9be8947a1..4e941b8d0 100644
--- a/src/ir/utils.h
+++ b/src/ir/utils.h
@@ -248,8 +248,9 @@ struct AutoDrop : public WalkerPass<ExpressionStackWalker<AutoDrop>> {
void reFinalize() { ReFinalizeNode::updateStack(expressionStack); }
void visitBlock(Block* curr) {
- if (curr->list.size() == 0)
+ if (curr->list.size() == 0) {
return;
+ }
for (Index i = 0; i < curr->list.size() - 1; i++) {
auto* child = curr->list[i];
if (isConcreteType(child->type)) {
@@ -264,11 +265,13 @@ struct AutoDrop : public WalkerPass<ExpressionStackWalker<AutoDrop>> {
void visitIf(If* curr) {
bool acted = false;
- if (maybeDrop(curr->ifTrue))
+ if (maybeDrop(curr->ifTrue)) {
acted = true;
+ }
if (curr->ifFalse) {
- if (maybeDrop(curr->ifFalse))
+ if (maybeDrop(curr->ifFalse)) {
acted = true;
+ }
}
if (acted) {
reFinalize();