<div dir="ltr">After talking with Alex about what's needed to be done here, I convinced myself of the opposite :)<div><br></div><div>The problem is that it looks to me like we don't win anything:</div><div>- if we have the break inside one annotated line with MustBreakBefore, that means we have to add logic to the joiner to be able to remove a break inside the annotated line (currently we only merge if annotated lines are not broken inside, which allows us to only look at the split points).I think adding the { joining to the line joining logic is not better than having it in the annotated lines merging logic (like it currently is).</div>
<div><br></div><div>- if we always keep { on the same line in the layouter, no matter what the style is, we make the joiner simpler, but then we have to add a step at the same part of the pipeline as the joiner to split the {'s out depending on the style; I think this makes the code more complex than Alex' current suggestion</div>
<div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 21, 2013 at 9:56 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Wed, Nov 20, 2013 at 7:32 PM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Nov 20, 2013 at 9:28 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Wed, Nov 20, 2013 at 6:12 PM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br>
@@ -681,6 +681,7 @@ void UnwrappedLineParser::parseStructura<br>
             Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup ||<br>
             Style.BreakBeforeBraces == FormatStyle::BS_Allman)<br>
           addUnwrappedLine();<br></blockquote><div><br></div></div></div><div>Does it still make sense to report the "{" as its own unwrapped line? Seems a bit convoluted to first report multiple lines and then merge them afterwards. I think this would make the merging code simpler.</div>



</div></div></div></blockquote><div><br></div></div><div>It also seemed strange to me. Should we instead handle BreakBeforeBraces in TokenAnnotator? This will require adding TokenType values for braces starting namespaces, classes/structs and, probably, enums. I can play with this a bit, it you think it makes sense.</div>


</div></div></div></blockquote><div><br></div></div></div><div>I might have already done this for enums. I don't think it is essential to add token types for all of these as e.g. enums and namespaces are really easy to detect. But adding token types might be the cleaner solution. I think that this makes sense but I remember having some kind of debate over this with Manuel, so he might have an opinion. </div>

</div></div></div></blockquote><div><br></div></div></div><div>I think the main motivation was that we didn't need it at the point, and we didn't have all the nuts and bolts in place to transfer the information precisely enough to the layouter...</div>

<div><br></div><div>Now seems to be a good time to change this... :) </div></div><br></div></div>
</blockquote></div><br></div>