From 2bd3758a22131cfd6925b3fd995657b211095c90 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 1 May 2019 14:48:41 -0700 Subject: 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. --- src/ir/LocalGraph.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ir/LocalGraph.cpp') diff --git a/src/ir/LocalGraph.cpp b/src/ir/LocalGraph.cpp index 1a2ccc0a2..a66009ec2 100644 --- a/src/ir/LocalGraph.cpp +++ b/src/ir/LocalGraph.cpp @@ -58,8 +58,9 @@ struct Flower : public CFGWalker, Info> { static void doVisitGetLocal(Flower* self, Expression** currp) { auto* curr = (*currp)->cast(); // if in unreachable code, skip - if (!self->currBasicBlock) + if (!self->currBasicBlock) { return; + } self->currBasicBlock->contents.actions.emplace_back(curr); self->locations[curr] = currp; } @@ -67,8 +68,9 @@ struct Flower : public CFGWalker, Info> { static void doVisitSetLocal(Flower* self, Expression** currp) { auto* curr = (*currp)->cast(); // if in unreachable code, skip - if (!self->currBasicBlock) + if (!self->currBasicBlock) { return; + } self->currBasicBlock->contents.actions.emplace_back(curr); self->currBasicBlock->contents.lastSets[curr->index] = curr; self->locations[curr] = currp; @@ -119,8 +121,9 @@ struct Flower : public CFGWalker, Info> { auto& block = basicBlocks[i]; auto& flowBlock = flowBlocks[i]; // Get the equivalent block to entry in the flow list - if (block.get() == entry) + if (block.get() == entry) { entryFlowBlock = &flowBlock; + } flowBlock.lastTraversedIteration = NULL_ITERATION; flowBlock.actions.swap(block->contents.actions); // Map in block to flow blocks @@ -171,8 +174,9 @@ struct Flower : public CFGWalker, Info> { // can do that for all gets as a whole, they will get the same results. for (Index index = 0; index < numLocals; index++) { auto& gets = allGets[index]; - if (gets.empty()) + if (gets.empty()) { continue; + } work.push_back(&block); // Note that we may need to revisit the later parts of this initial // block, if we are in a loop, so don't mark it as seen. -- cgit v1.2.3