[PATCH] D43627: [DEBUGINFO] Add flag for DWARF2 or less to use sections as references.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 10:41:42 PST 2018


In fact none of this is in the style guide itself, it's just lore and the
usual argument for consistency with surrounding code.

There are many examples of most points on this spectrum - the generally
agreed upon bit is "single line blocks (without connected/related blocks -
like else, etc) shouldn't have braces". Whether you brace multiline, single
statement blocks, or brace all related blocks if one of them is braced, is
much more variable and I generally leave up  to the author unless there's
some really clear consistency argument to be made.

On Thu, Mar 1, 2018 at 6:58 AM Alexey Bataev via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> ABataev added a comment.
>
> In https://reviews.llvm.org/D43627#1022846, @JDevlieghere wrote:
>
> > I really hate to go on about this, but the truth is that I've been told
> this so many times that it instantly caught my eye. 😀
>
>
>
>
> 1. Several years ago I got a lot of reviews where reviewers insisted(!!!)
> to enclose multiline (not multistatement!!!) single-statement substatements
> into braces. I did for the last 6 years and had no problems with it. This
> is the first time I see this. Di I miss something, the rules changed
> already?
> 2. There is a patch https://reviews.llvm.org/D26943, that was accepted
> but not committed to enclosing multiline (not multistatement) substatements
> in `if` and `for` statements. It is clear that multistatement substatements
> must be enclosed and this kind of rule is not required at all.
>
> I'm not against this kind of change but seems to me this is not strictly
> standardized.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D43627
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180305/81cd5f64/attachment.html>


More information about the llvm-commits mailing list