<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>