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





<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">$ cat BracedList.cpp</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-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 BracedList.cpp</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>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">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_-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;color:black">From:
</span></b><span style="font-size:12pt;color:black">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_-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>