search for: single_line_stat

Displaying 5 results from an estimated 5 matches for "single_line_stat".

2020 Jun 22
7
Codifying our Brace rules-
...ndated, and that's been my personal policy for reviews. In particular, if (!is_transform_applicable) { return {}; } is very aggravating clutter. Braces should be required around multi-line statements. Note: BAD: for (...) for (...) single_line_statement; GOOD: for (...) { for (...) single_line_statement; } Cheers, Nicolai -- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte. _______________________________________________ LLVM Developers mailing list...
2020 Jun 16
3
Codifying our Brace rules-
My 2 pennies is braces add unnecessary clutter and impair readability when used on a *single-line* statement. I count comments, that are on their own line as statement(s). For example: BAD: if (cond) // Comment foo(); GOOD: if (cond) { // Comment foo(); } BAD: if (cond) { foo(); // Comment } GOOD: if (cond) foo(); // Comment BAD: if (cond) for(;;) foo() GOOD: if (cond)
2020 Jun 23
2
Codifying our Brace rules-
...ansform_applicable) { >> return {}; >> } >> >> is very aggravating clutter. >> >> Braces should be required around multi-line statements. Note: >> >> BAD: >> for (...) >> for (...) >> single_line_statement; >> >> GOOD: >> for (...) { >> for (...) >> single_line_statement; >> } >> >> Cheers, >> Nicolai >> -- >> Lerne, wie die Welt wirklich ist, >> aber vergiss niemals, wie...
2020 Jun 22
4
Codifying our Brace rules-
...(!is_transform_applicable) { > return {}; > } > > is very aggravating clutter. > > Braces should be required around multi-line statements. Note: > > BAD: > for (...) > for (...) > single_line_statement; > > GOOD: > for (...) { > for (...) > single_line_statement; > } > > Cheers, > Nicolai > -- > Lerne, wie die Welt wirklich ist, > aber vergiss niemals, wie sie sein...
2020 Jun 24
4
Codifying our Brace rules-
...;>> > >>> is very aggravating clutter. > >>> > >>> Braces should be required around multi-line statements. Note: > >>> > >>> BAD: > >>> for (...) > >>> for (...) > >>> single_line_statement; > >>> > >>> GOOD: > >>> for (...) { > >>> for (...) > >>> single_line_statement; > >>> } > >>> > >>> Cheers, > >>> Nicolai > >>> -- &gt...