<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 25, 2015 at 2:57 AM, matthew whitehead via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="cremed">cfe-dev@lists.llvm.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">Similar to bug 25148<br><a href="https://llvm.org/bugs/show_bug.cgi?id=25148" target="_blank" class="cremed">https://llvm.org/bugs/show_bug.cgi?id=25148</a> <br><div><br>There seems to be no options for directly formatting large template declarations, instead the formatting is done mostly using the column width and associates penalties. <br>(An example of our preferred formatting style for templates can be seen in example1.cpp (attached), while the current output of clang-format can be seen in example2.cpp). <br><br>Is there any current options that would solve provide the formatting we require that I have overlooked please?<br>if not, is there anyone currently working on implementing something like this?<br></div></div></blockquote><div><br></div><div>I don't think so (for both questions).</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>otherwise, I would potentially be interested in implementing something to solve this if someone can give me some guidance on where to start?<br></div></div></blockquote><div><br></div><div>Sure. I need more specific questions, though. Looking at what AlignAfterOpenBracket is doing seems to be a good starting point. Well actually the best starting point might be to write down the exact rules that you are trying to implement in prose and get some kind of agreement here. Ideally you have a style guide explaining them (<a href="http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options">http://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options</a>).</div><div> <br></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>our .clang-format is attached as well for reference  <br><br></div><div>I was thinking a potential solution would be adding an AlwaysBreakOnOpeningTemplate option similar to the AlignAfterOpenBracket option.<br></div></div></blockquote><div><br></div><div>Either that or even just re-use AlignAfterOpenBracket. Seems to me that people wanting the one likely also want the other.</div><div><br></div><div>Cheers,<br>Daniel</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><br></div><div>Cheers,<br></div><div>Matt<br></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" class="cremed">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="cremed">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>