Skip to content

Commit 7a8bc1e

Browse files
authored
Merge pull request #92 from filipsajdak/fsajdak-fix-parens-with-std-cout
[FIX] preserving parens for std::cout expressions
2 parents bd218d0 + 1e4556c commit 7a8bc1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/cppfront.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,9 @@ class cppfront
18571857
}
18581858
}
18591859
assert(n.expr);
1860+
push_need_expression_list_parens(true);
18601861
emit(*n.expr);
1862+
pop_need_expression_list_parens();
18611863
printer.print_cpp2(suffix, n.position());
18621864
}
18631865

0 commit comments

Comments
 (0)