[PATCH] D26943: [CodingStandards] Add style guide rule about "if" statements and loops.
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 15:31:10 PST 2016
rnk added a comment.
In https://reviews.llvm.org/D26943#601951, @jlebar wrote:
> > I feel like this should live down near "Don’t use else after a return"
>
> I put it here because the overall section header is "Mechanical Source Issues". But now I see that e.g. "Spaces Before Parentheses" is down at the bottom of the doc, so...I now have no idea how this is structured.
>
> > to make it clear we want braces for if else.
>
> We do? Elsewhere in the style guide they have unbraced if/else, e.g. following "or better yet (in this case)".
There's definitely prior art in LLVM for unbraced else if chains.
https://reviews.llvm.org/D26943
More information about the llvm-commits
mailing list