<div dir="ltr">This patch should fix <a href="http://llvm-reviews.chandlerc.com/D2455">http://llvm-reviews.chandlerc.com/D2455</a><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 17, 2013 at 1:03 AM, 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"><div class="im">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><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<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>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><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 class="im"><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></div></div></div></blockquote></div><br>
</div></div>