<div dir="ltr">Hi Csaba,<div><br></div><div>I can think of several possible results that look better (to me) than the current one:</div><div><br></div><div><div>int func() {</div><div> aaaaaaaaaaa = bbbbbbbbbb->cccccccccc(</div><div> SomeNamespace::Function(dddddddd?"eeeeeeee":"ffffffff")).gggggggggg();</div><div>}</div></div><div><br></div><div>OR</div><div><br></div><div><div>int func() {</div><div> aaaaaaaaaaa = bbbbbbbbbb->cccccccccc(</div><div> SomeNamespace::Function(</div><div> dddddddd?"eeeeeeee":"ffffffff")</div><div> ).gggggggggg();</div><div>}</div></div><div><br></div><div><br></div><div>OR</div><div><br></div><div><div>int func() {</div><div> aaaaaaaaaaa = bbbbbbbbbb->cccccccccc(SomeNamespace::Function(</div><div> dddddddd?"eeeeeeee":"ffffffff")).gggggggggg();</div><div>}</div></div><div><br></div><div><br></div><div>In fact, pretty much anything that doesn't break the line at '->' works for me.</div><div><br></div><div>This is not the case with the current clang-format, though. If you run clang-format (with any predefined style) for either of the aforementioned codes, it always breaks the line with '->', even if all lines satisfy the column limit.</div><div><br></div><div>Thank you,</div><div>Mikhail</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 24, 2017 at 10:25 AM, Csaba Raduly <span dir="ltr"><<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mikhail,<br>
<span class=""><br>
On Thu, Jun 22, 2017 at 11:44 PM, Mikhail Artemyev via cfe-users<br>
<<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br>
> Hi All,<br>
><br>
> I am currently trying to beatify a reasonably large code base, and I am<br>
> quite surprised about how clang-format breaks long lines where there is a<br>
> '->' operator.<br>
><br>
> Example:<br>
> % cat test.cpp<br>
> int func() {<br>
> aaaaaaaaaaa = bbbbbbbbbb->cccccccccc(<wbr>SomeNamespace::Function(<wbr>dddddddd?"eeeeeeee":"ffffffff"<wbr>)).gggggggggg();<br>
> }<br>
<br>
<br>
</span>How would you like the result to look like?<br>
<span class="HOEnZb"><font color="#888888"><br>
Csaba<br>
<br>
--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
"People disagree with me. I just ignore them." -- Linus Torvalds<br>
</font></span></blockquote></div><br></div>