[llvm-bugs] [Bug 28960] New: clang-format not lining up constructor calls in for loop

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 12 16:00:19 PDT 2016


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

            Bug ID: 28960
           Summary: clang-format not lining up constructor calls in for
                    loop
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm-bugs at justinbogner.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

Given the following (correctly formatted) snippet:

void f() {
  for (SomeKindOfIterator I(get_the_first_one_somehow()),
                          E(get_the_end_somehow());
       I != E; ++I) {
    // ...
  }
}

clang-format changes it like so:

void f() {
  for (SomeKindOfIterator I(get_the_first_one_somehow()),
       E(get_the_end_somehow());
       I != E; ++I) {
    // ...
  }
}

Note that E is lined up with the left bracket of the for(), rather than lined
up with I.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160812/1de5e76e/attachment.html>


More information about the llvm-bugs mailing list