<div dir="ltr">Such an alignment is quite contrary to how clang-format currently operates and it will be a significant change to implement this. It would somewhat relate to how we align trailing comments and escaped newlines, but significantly more complex. You would mostly need to change lib/Format/WhitespaceManager.cpp.<div>
<br></div><div>Cheers,<br>Daniel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 7:14 PM, Petteri Salo <span dir="ltr"><<a href="mailto:petteri.salo@gmail.com" target="_blank">petteri.salo@gmail.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">Hello,<div><br></div><div>Can someone give me some pointers about where to look in the clang-format sources to make a modification which would allow alignment of the function names in a group of function declarations.</div>

<div><br></div><div>Or tell me if it is impossible without significant re-write, in other words not doable after work and family.</div><div><br></div><div>For example:</div><div><br></div><div><div>class FooBar</div><div>

{</div><div>    // these three function declarations belong to "group A"</div><div>    char* doo();</div><div>    const char* daa();</div><div>    const SomeReallyLongTypeName& dii();</div><div>    //------------------------------------------------</div>

<div><br></div><div>    // these three function declarations belong to "group B"</div><div>    void someMoreDoo();</div><div>    int notSoMuchDaa();</div><div>    //------------------------------------------------</div>

<div>};<br></div><div><br></div></div><div>In a real scenario the comment lines with "group x" would not be present.</div><div><br></div><div>The end result I'm looking for is:</div><div>- The names of the three functions in the group A would start at the same column, i.e. doo() and daa() would align with dii().</div>

<div>- The name notSoMuchDaa() would align with someMoreDoo()</div><div><br></div><div>the comment line with dashes (//----- ) would signify "end of group"</div><div><br></div><div>Thanks,</div><div><br></div><div>

Petteri Salo</div><div><br></div><div><br></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>