https://llvm.org/bugs/show_bug.cgi?id=25906

            Bug ID: 25906
           Summary: Alignment when calling a chain of functions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

Suppose I have something like this, AAAAAAAAAAAAAAAAAA is a member function of
obj that returns an object, and that object has member function
BBBBBBBBBBBBBBBBBB which also returns an object and so on.

void main()
{
 
obj.AAAAAAAAAAAAAAAAAA(a).BBBBBBBBBBBBBBBBBB(b).CCCCCCCCCCCCCCCCCC(c)->DDDDDDDDDDDDD(d);
}

When using the default google style, it reformats to

void main()
{
  obj.AAAAAAAAAAAAAAAAAA(a)
      .BBBBBBBBBBBBBBBBBB(b)
      .CCCCCCCCCCCCCCCCCC(c)
      ->DDDDDDDDDDDDD(d);
}

Is is possible to add a feature (or perhaps it exist) so that it can be
reformatted to 

void main()
{
  obj.AAAAAAAAAAAAAAAAAA(a).BBBBBBBBBBBBBBBBBB(b).CCCCCCCCCCCCCCCCCC(c)
     ->DDDDDDDDDDDDD(d);
}

or at least to 

void main()
{
  obj.AAAAAAAAAAAAAAAAAA(a)
     .BBBBBBBBBBBBBBBBBB(b)
     .CCCCCCCCCCCCCCCCCC(c)
     ->DDDDDDDDDDDDD(d);
}

Please let me know, thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to