[cfe-users] clang-format option to not break lines at operator ->

Csaba Raduly via cfe-users cfe-users at lists.llvm.org
Sat Jun 24 02:25:18 PDT 2017


Hi Mikhail,

On Thu, Jun 22, 2017 at 11:44 PM, Mikhail Artemyev via cfe-users
<cfe-users at lists.llvm.org> wrote:
> Hi All,
>
> I am currently trying to beatify a reasonably large code base, and I am
> quite surprised about how clang-format breaks long lines where there is a
> '->' operator.
>
> Example:
> % cat test.cpp
> int func() {
>    aaaaaaaaaaa = bbbbbbbbbb->cccccccccc(SomeNamespace::Function(dddddddd?"eeeeeeee":"ffffffff")).gggggggggg();
> }


How would you like the result to look like?

Csaba

-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



More information about the cfe-users mailing list