r196378 - Leave constructor initializer lists on one line in styles with no column limit.

Alexander Kornienko alexfh at google.com
Mon Dec 16 14:41:40 PST 2013


On Mon, Dec 16, 2013 at 9:21 PM, Nico Weber <thakis at chromium.org> wrote:

> Thanks!
>
> Current head now does:
> thakis$ echo "A():b(0),c(0) {}" | Release+Asserts/bin/clang-format
>  -style=WebKit
> A()
>     : b(0)
>     , c(0) {}
>
> The {} is still wrong according to
> http://www.webkit.org/coding/coding-style.html "Function definitions:
> place each brace on its own line."
>

Does WebKit style allow short (0-1 statements) function bodies on a single
line? If no, the solution is just to turn off the corresponding flag for
the WebKit style. If yes, we should probably refrain from joining lines in
constructor with initializer lists,
when BreakConstructorInitializersBeforeComma is true.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131216/d7549ba5/attachment.html>


More information about the cfe-commits mailing list