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

            Bug ID: 43854
           Summary: [C++] clang-format pointer alignment off in extern
                    method declaration inside of another method
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: yiqi...@microsoft.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

Configuration:
BinPackArguments: false
BinPackParameters: false
PointerAlignment: Left

Found in llvm build 10.0.0+b452de0 (also in earlier builds) when there is a
nested extern method declaration, the point alignment is incorrect.  In this
case, only "left alignment" is expected but the pointer is at the center.  This
only happens if the "extern" method declaration is inside of another method.

Wrong output:
int foo() {
  extern MyTypeB* Nested(Mytype * aaaaaa,
                         Mytype * bbbbbb,
                         Mytype * cccccc,
                         Mytype * dddddd,
                         Mytype e);
}

Expected output:
int foo() {
  extern MyTypeB* Nested(Mytype* aaaaaa,
                         Mytype* bbbbbb,
                         Mytype* cccccc,
                         Mytype* dddddd,
                         Mytype e);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to