<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Owen,<div class=""><br class=""></div><div class="">looking good, thanks a lot! Will this patch be part of the 9.0 release?</div><div class=""><br class=""></div><div class="">Cheers.M<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 10 Sep 2019, at 12:19, Owen Pan <<a href="mailto:owenpiano@gmail.com" class="">owenpiano@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Martin,<div class=""><br class=""></div><div class="">Please see below:</div><div class=""><br class=""></div><div class=""><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;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class="">build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ cp ATT11905.clang-format .clang-format</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;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class="">build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ bin/clang-format SomeUnit.c > SomeUnit.c.c-f</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;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class="">build</b></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">$ diff SomeUnit.c SomeUnit.c.c-f</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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">30,35c30,36</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;" class=""><span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">< <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">---</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;" class=""><span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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;" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">> <span class="gmail-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);" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><b class="">build</b></span><span class="gmail-s3" style="font-variant-ligatures: no-common-ligatures;">$<span class="gmail-Apple-converted-space"> </span></span></div></div><div class=""><br class=""></div><div class="">I will create a patch and commit the fix in a few days.</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Owen</div></div><br class=""><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" class="">lmapii@googlemail.com</a>> wrote:<br class=""></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;" class="">Hi,<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">I've attached the clang-format file as well as the source file - maybe the files got lost while forwarding.</div><div class=""><br class=""></div><div class="">Cheers, Martin</div><div class=""><br class=""><div class=""></div></div></div><div style="overflow-wrap: break-word;" class=""><div class=""><div class="gmail-m_907801244209503016AppleOriginalContents"></div></div></div><div style="overflow-wrap: break-word;" class=""><div class=""><div class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 10 Sep 2019, at 10:41, Owen Pan <<a href="mailto:owenpiano@gmail.com" target="_blank" class="">owenpiano@gmail.com</a>> wrote:</div><br class="gmail-m_907801244209503016Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Shoaib,<div class=""><br class=""></div><div class="">Is this what you need? Can you send the .clang-format file you used?</div><div class=""><br class=""></div><div class=""><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" class=""><span class="gmail-m_907801244209503016gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class="">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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><span class="gmail-m_907801244209503016gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(170,171,37)"><b class="">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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><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" class=""><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)" class=""><span class="gmail-m_907801244209503016gmail-s2" style="font-variant-ligatures:no-common-ligatures"><b class="">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 class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Owen</div></div><br class=""><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" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></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" class="">
<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 class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></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" class=""><p class="MsoNormal" style="margin-left:0.5in"><b class=""><span style="font-size:12pt" class="">From:
</span></b><span style="font-size:12pt" class="">llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank" class="">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" class="">llvm-dev@lists.llvm.org</a>><br class="">
<b class="">Reply-To: </b>martin lampacher <<a href="mailto:lmapii@googlemail.com" target="_blank" class="">lmapii@googlemail.com</a>><br class="">
<b class="">Date: </b>Monday, September 9, 2019 at 12:04 AM<br class="">
<b class="">To: </b>LLVM Development List <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>><br class="">
<b class="">Subject: </b>[llvm-dev] clang-format behaviour for braced lists indent<u class=""></u><u class=""></u></span></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class="">
<div class=""><p class="MsoNormal" style="margin-left:0.5in">Hello,<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class="">
<div class=""><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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class="">static</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> </span><span style="font-family:Menlo;color:rgb(86,156,214)" class="">void</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> </span><span style="font-family:Menlo;color:rgb(220,220,170)" class="">someUnitInternalFunction</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">(<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> </span><span style="font-family:Menlo;color:rgb(86,156,214)" class="">const</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">someParameter</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 *</span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">somePointer</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">normalParameter</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint8 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">anotherParameterLong</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">);<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""><br class="">
<br class="">
<u class=""></u><u class=""></u></span></p>
<div class=""><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)" class="">uint32 </span><span style="font-family:Menlo;color:rgb(220,220,170)" class="">SomeUnitWithSomeVeryLongFunctionName</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">(<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">parameterOne</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">parameterTwo</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">parameterThree</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> uint32 </span><span style="font-family:Menlo;color:rgb(156,220,254)" class="">parameterFour</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">)<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class="">{<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> </span><span style="font-family:Menlo;color:rgb(220,220,170)" class="">someUnitInternalFunction</span><span style="font-family:Menlo;color:rgb(212,212,212)" class="">(<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> someInternalVariableWithSomeVeryLongName,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> &yetAnotherInternalVariableLongNameStyle,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> nowThisNameIsShorter,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> nowThisNameIsShorter);<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class="">}<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></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)" class=""><u class=""></u> <u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
</div>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""><span style="font-family:Arial,sans-serif;color:rgb(51,51,51)" class="">Cpp11BracedListStyle:
true</span></strong>):<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class="">
<div class=""><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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class="">static</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> uint8 CddDp83848Reg</span><span style="font-family:Menlo;color:rgb(86,156,214)" class="">[]</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> = {CDDDP83848_BMCR_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_BMSR_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYIDR1_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYIDR2_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYSTS_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_RBR_REGISTER};<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
</div>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in">Whereas I'd expect it the following style:<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class="">
<div class=""><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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class="">static</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> uint8 CddDp83848Reg</span><span style="font-family:Menlo;color:rgb(86,156,214)" class="">[]</span><span style="font-family:Menlo;color:rgb(212,212,212)" class=""> = {<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_BMCR_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_BMSR_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYIDR1_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYIDR2_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_PHYSTS_REGISTER,<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
<div class=""><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)" class=""> CDDDP83848_RBR_REGISTER};<u class=""></u><u class=""></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)" class=""><u class=""></u> <u class=""></u></span></p>
</div>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in">According to the documentation<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><span style="font-family:Arial,sans-serif;color:rgb(51,51,51);background:white" class="">Fundamentally, C++11 braced lists are formatted
<b class="">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)" class="">{}</span></span><span style="font-family:Arial,sans-serif;color:rgb(51,51,51);background:white" class=""> were
the parentheses of a function call with that name. If there is no name, a zero-length name is assumed.</span><u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in">Thanks and BR,<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in">Martin<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in">Attached demo file and clang-format settings<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:0.5in"><u class=""></u> <u class=""></u></p>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>