<div dir="ltr">Hi everyone, <br>I am currently working on modifying clang-format to handle some missing NetBSD style rules,<br>I have added a new rule "LineupBitfieldDeclarations" which set to "true": should<div>format the input to the output format as shown below,<br><b>Input:</b><br><p dir="ltr" style="font-size:x-small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">unsigned int baz : 1,</span><span style="background-color:transparent;color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap;text-indent:36pt">  fuz : 5,</span><span style="background-color:transparent;color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap"> zap : 2;</span></p><div><div dir="ltr" class="gmail-m_-5838900591457730107gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><b>Output: <br></b><p dir="ltr" style="font-size:x-small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">unsigned int baz : 1, </span></p><p dir="ltr" style="font-size:x-small;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap;text-indent:36pt">                     fuz : 5,</span></p><p dir="ltr" style="font-size:x-small;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:36pt"><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">    zap : 2;</span></p><p dir="ltr" style="font-size:x-small;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:36pt"><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></p></div><div>I have got so near but am facing two issues, <br>1. ColmmLimit overrides while breaking the bitfield declarations in one line while the State Column is less than column limit.<br>2. The indentation after the break is different from variable declarations:<br><br>Can I get some help to fix these issues? <br>For 1st issue I guess I could stop when the Bitfields occur in the following line:<br><a href="https://github.com/llvm-mirror/clang/blob/master/lib/Format/ContinuationIndenter.cpp#L1704" target="_blank">https://github.com/llvm-mirror/clang/blob/master/lib/Format/ContinuationIndenter.cpp#L1704</a><br>But didn't get it to work, Is there somewhere else I should be looking at? </div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>---<br></div><div>Regards,<br></div>Manikishan Ghantasala<br></div><div>B.tech CSE<br><a href="http://foss.amrita.ac.in/accounts/104/" target="_blank">foss@amrita</a><br></div></div><div><a href="https://twitter.com/ManikishanG" target="_blank">twitter</a> | <a href="https://github.com/sh4nnu" target="_blank">GitHub</a> | <a href="https://www.hackerrank.com/manikishanghant1" target="_blank">Hackerrank</a><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>