<div dir="ltr">On Mon, Dec 16, 2013 at 2:41 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="im">On Mon, Dec 16, 2013 at 9:21 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thanks!<div><br>Current head now does:</div>
<div><div>thakis$ echo "A():b(0),c(0) {}" | Release+Asserts/bin/clang-format -style=WebKit</div><div>A()</div><div> : b(0)</div><div> , c(0) {}</div>
<div><br></div><div>The {} is still wrong according to <a href="http://www.webkit.org/coding/coding-style.html" target="_blank">http://www.webkit.org/coding/coding-style.html</a> "Function definitions: place each brace on its own line."</div>
</div></div></blockquote><div><br></div></div><div>Does WebKit style allow short (0-1 statements) function bodies on a single line?</div></div></div></div></blockquote><div><br></div><div>In my interpretation of the style guide this isn't allowed ("Function definitions: place each brace on its own line."). In practice, inline definitions of short methods in classes are on single lines often.</div>
<div><br></div><div>For regular toplevel methods, both braces are always on their own line each almost always (according to `find Source/core/ -name '*.cpp' | xargs ack '\{.*\}'`)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> 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.</div>
</div>
</div></div>
</blockquote></div><br></div></div>