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

            Bug ID: 33956
           Summary: clang-format  problem with AlignConsecutiveAssignments
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Created attachment 18852
  --> https://bugs.llvm.org/attachment.cgi?id=18852&action=edit
source file

Version: clang-format version 6.0.0 (trunk 309066)
Installer : None ran from build/bin directory
Command line: ./clang-format input.cpp >output.cpp

Attached : input.cpp 
Attached : output.cpp what I get, meant to be view with editor set with tab of
4
Attached : .clang-format file which I renamed dot.clang-format in case bugzilla
has issue with file starting with .

AlignConsecutiveAssignments is set to true but the resulting alignment is not
right.

Input:
void foo()
{
    int msgxType, msgxBuffer, msgxLenBuffer, msgxCommand;

    msgxType = 0;
    msgxBuffer = 0;
    msgxLenBuffer = 0;
    msgxCommand = 0;
}

Output: However here i replaced the tabs with spaces.
void foo()
{
    int msgxType, msgxBuffer, msgxLenBuffer, msgxCommand;

    msgxType      = 0;
    msgxBuffer  = 0;
    msgxLenBuffer = 0;
    msgxCommand   = 0;
}

The = 0 for msgxBuffer is not aligned properly

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