<div dir="ltr">Hi Martin,<div><br></div><div>Please see below:</div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b>build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ cp ATT11905.clang-format .clang-format</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b>build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ bin/clang-format SomeUnit.c > SomeUnit.c.c-f</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b>build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ diff SomeUnit.c SomeUnit.c.c-f</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">30,35c30,36</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< static uint8 CddDp83848Reg[] = {CDDDP83848_BMCR_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-Apple-converted-space">                                </span>CDDDP83848_BMSR_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-Apple-converted-space">                                </span>CDDDP83848_PHYIDR1_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-Apple-converted-space">                                </span>CDDDP83848_PHYIDR2_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-Apple-converted-space">                                </span>CDDDP83848_PHYSTS_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-Apple-converted-space">                                </span>CDDDP83848_RBR_REGISTER};</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">---</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> static uint8 CddDp83848Reg[] = {</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_BMCR_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_BMSR_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_PHYIDR1_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_PHYIDR2_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_PHYSTS_REGISTER,</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-Apple-converted-space">    </span>CDDDP83848_RBR_REGISTER};</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(170,171,37)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><b>build</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">$<span class="gmail-Apple-converted-space"> </span></span></p></div><div><br></div><div>I will create a patch and commit the fix in a few days.</div><div><br></div><div>Regards,</div><div><br></div><div>Owen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019 at 2:08 AM martin lampacher <<a href="mailto:lmapii@googlemail.com">lmapii@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi,<div><br></div><div>Shoaib was so nice to forward this to the correct list. Yes, that's what I'd need. Deafult or LLVM style would generate this but only because of the low ColumnLimit, which is 120 (and in future even 150) for my case. At least that's what I've figured when comparing against the LLVM style dump.</div><div><br></div><div>I've attached the clang-format file as well as the source file - maybe the files got lost while forwarding.</div><div><br></div><div>Cheers, Martin</div><div><br><div></div></div></div><div style="overflow-wrap: break-word;"><div><div class="gmail-m_907801244209503016AppleOriginalContents"></div></div></div><div style="overflow-wrap: break-word;"><div><div></div><div><br><blockquote type="cite"><div>On 10 Sep 2019, at 10:41, Owen Pan <<a href="mailto:owenpiano@gmail.com" target="_blank">owenpiano@gmail.com</a>> wrote:</div><br class="gmail-m_907801244209503016Apple-interchange-newline"><div><div dir="ltr">Hi Shoaib,<div><br></div><div>Is this what you need? Can you send the .clang-format file you used?</div><div><br></div><div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b>build</b></span><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ cat BracedList.cpp</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures">static uint8 CddDp83848Reg[] = {CDDDP83848_BMCR_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">                                </span>CDDDP83848_BMSR_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">                                </span>CDDDP83848_PHYIDR1_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">                                </span>CDDDP83848_PHYIDR2_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">                                </span>CDDDP83848_PHYSTS_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">                                </span>CDDDP83848_RBR_REGISTER};</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b>build</b></span><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ bin/clang-format BracedList.cpp</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures">static uint8 CddDp83848Reg[] = {</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_BMCR_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_BMSR_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_PHYIDR1_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_PHYIDR2_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_PHYSTS_REGISTER,</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_907801244209503016gmail-Apple-converted-space">    </span>CDDDP83848_RBR_REGISTER};</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(170,171,37)"><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><b>build</b></span><span class="gmail-m_907801244209503016gmail-s3" style="font-variant-ligatures:no-common-ligatures">$<span class="gmail-m_907801244209503016gmail-Apple-converted-space"> </span></span></div></div><div><br></div><div>Regards,</div><div><br></div><div>Owen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 9, 2019 at 8:23 AM Shoaib Meenai via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_907801244209503016gmail-m_-9028736445229325334WordSection1"><p class="MsoNormal">(forwarding this to cfe-dev and BCC'ing llvm-dev, since cfe-dev is a better place for clang-format queries)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in"><p class="MsoNormal" style="margin-left:0.5in"><b><span style="font-size:12pt">From:
</span></b><span style="font-size:12pt">llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> on behalf of martin lampacher via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Reply-To: </b>martin lampacher <<a href="mailto:lmapii@googlemail.com" target="_blank">lmapii@googlemail.com</a>><br>
<b>Date: </b>Monday, September 9, 2019 at 12:04 AM<br>
<b>To: </b>LLVM Development List <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject: </b>[llvm-dev] clang-format behaviour for braced lists indent<u></u><u></u></span></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<div><p class="MsoNormal" style="margin-left:0.5in">Hello,<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">I've introduced clang-format (current version 8.0) to enforce some company coding guideline but I am struggling with list initializers.<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">The formatter works nicely with function declarations and function calls and aligns arguments on break like that:<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(86,156,214)">static</span><span style="font-family:Menlo;color:rgb(212,212,212)"> </span><span style="font-family:Menlo;color:rgb(86,156,214)">void</span><span style="font-family:Menlo;color:rgb(212,212,212)"> </span><span style="font-family:Menlo;color:rgb(220,220,170)">someUnitInternalFunction</span><span style="font-family:Menlo;color:rgb(212,212,212)">(<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    </span><span style="font-family:Menlo;color:rgb(86,156,214)">const</span><span style="font-family:Menlo;color:rgb(212,212,212)"> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">someParameter</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 *</span><span style="font-family:Menlo;color:rgb(156,220,254)">somePointer</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">normalParameter</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint8 </span><span style="font-family:Menlo;color:rgb(156,220,254)">anotherParameterLong</span><span style="font-family:Menlo;color:rgb(212,212,212)">);<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><br>
<br>
<u></u><u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">uint32 </span><span style="font-family:Menlo;color:rgb(220,220,170)">SomeUnitWithSomeVeryLongFunctionName</span><span style="font-family:Menlo;color:rgb(212,212,212)">(<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">parameterOne</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">parameterTwo</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">parameterThree</span><span style="font-family:Menlo;color:rgb(212,212,212)">,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)">parameterFour</span><span style="font-family:Menlo;color:rgb(212,212,212)">)<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">{<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    </span><span style="font-family:Menlo;color:rgb(220,220,170)">someUnitInternalFunction</span><span style="font-family:Menlo;color:rgb(212,212,212)">(<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">        someInternalVariableWithSomeVeryLongName,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">        &yetAnotherInternalVariableLongNameStyle,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">        nowThisNameIsShorter,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">        nowThisNameIsShorter);<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">}<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
</div>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">This matches the configured continuation indent width. For lists, however, the indent does not match what I've expected: A list that exceeds the configured margin is formatted as following (I'm using <strong><span style="font-family:Arial,sans-serif;color:rgb(51,51,51)">Cpp11BracedListStyle:
 true</span></strong>):<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(86,156,214)">static</span><span style="font-family:Menlo;color:rgb(212,212,212)"> uint8 CddDp83848Reg</span><span style="font-family:Menlo;color:rgb(86,156,214)">[]</span><span style="font-family:Menlo;color:rgb(212,212,212)"> = {CDDDP83848_BMCR_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">                                CDDDP83848_BMSR_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">                                CDDDP83848_PHYIDR1_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">                                CDDDP83848_PHYIDR2_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">                                CDDDP83848_PHYSTS_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">                                CDDDP83848_RBR_REGISTER};<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
</div>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">Whereas I'd expect it the following style:<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(86,156,214)">static</span><span style="font-family:Menlo;color:rgb(212,212,212)"> uint8 CddDp83848Reg</span><span style="font-family:Menlo;color:rgb(86,156,214)">[]</span><span style="font-family:Menlo;color:rgb(212,212,212)"> = {<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_BMCR_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_BMSR_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_PHYIDR1_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_PHYIDR2_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_PHYSTS_REGISTER,<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
<div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)">    CDDDP83848_RBR_REGISTER};<u></u><u></u></span></p>
</div><p class="MsoNormal" style="margin-left:0.5in;line-height:13.5pt;background:rgb(30,30,30)">
<span style="font-family:Menlo;color:rgb(212,212,212)"><u></u> <u></u></span></p>
</div>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">According to the documentation<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><span style="font-family:Arial,sans-serif;color:rgb(51,51,51);background:white">Fundamentally, C++11 braced lists are formatted
<b>exactly like function calls</b> would be formatted in their place. If the braced list follows a name (e.g. a type or variable name), clang-format formats as if the </span><span class="gmail-m_907801244209503016gmail-m_-9028736445229325334xpre"><span style="font-family:"Courier New";color:rgb(51,51,51);background:rgb(226,226,226)">{}</span></span><span style="font-family:Arial,sans-serif;color:rgb(51,51,51);background:white"> were
 the parentheses of a function call with that name. If there is no name, a zero-length name is assumed.</span><u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">And I have the following setting: ContinuationIndentWidth: 4. As you can see the function call is formatted nicely whereas the list initializer isn't, according to the documentation the formatting should be the
 same.<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">Can someone please help me out here? I've checked several settings and can't make clang-format indent initializers according to the (admittedly a bit special) style.<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">Thanks and BR,<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">Martin<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in">Attached demo file and clang-format settings<u></u><u></u></p>
</div>
<div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
</div>
</div>
</div>

_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div>