summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer/simple_ast.cpp
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/emscripten-optimizer/simple_ast.cpp
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/emscripten-optimizer/simple_ast.cpp')
-rw-r--r--src/emscripten-optimizer/simple_ast.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/emscripten-optimizer/simple_ast.cpp b/src/emscripten-optimizer/simple_ast.cpp
index 5853b3289..6afa0a66e 100644
--- a/src/emscripten-optimizer/simple_ast.cpp
+++ b/src/emscripten-optimizer/simple_ast.cpp
@@ -105,10 +105,11 @@ void Value::stringify(std::ostream& os, bool pretty) {
}
for (size_t i = 0; i < arr->size(); i++) {
if (i > 0) {
- if (pretty)
+ if (pretty) {
os << "," << std::endl;
- else
+ } else {
os << ", ";
+ }
}
indentify();
(*arr)[i]->stringify(os, pretty);
@@ -141,8 +142,9 @@ void Value::stringify(std::ostream& os, bool pretty) {
first = false;
} else {
os << ", ";
- if (pretty)
+ if (pretty) {
os << std::endl;
+ }
}
indentify();
os << '"' << i.first.c_str() << "\": ";
@@ -178,10 +180,11 @@ void Value::stringify(std::ostream& os, bool pretty) {
void dump(const char* str, Ref node, bool pretty) {
std::cerr << str << ": ";
- if (!!node)
+ if (!!node) {
node->stringify(std::cerr, pretty);
- else
+ } else {
std::cerr << "(nullptr)";
+ }
std::cerr << std::endl;
}