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

            Bug ID: 46609
           Summary: clang-format does not obey `PointerAlignment: Right`
                    for ellipsis in declarator for pack
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: hst...@ca.ibm.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org, mydeveloper...@gmail.com

Considering that the ellipsis that is part of a declarator for a pack binds
tighter to the id-expression than the ptr-operator in a pointer declarator, I
don't understand why `clang-format` does not obey `PointerAlignment` for these
ellipses. Indeed, `clang-format` seems to format the declaration for a pack of
pointers in a way that I don't expect humans would.

### SOURCE (<stdin>):
template <int *...PP> struct A;


### TOOL INVOCATION:
clang-format -style="{BasedOnStyle: llvm, PointerAlignment: Right}"


### ACTUAL OUTPUT:
template <int *... PP> struct A;


### EXPECTED OUTPUT:
template <int *...PP> struct A;


### TOOL VERSION INFO (clang-format --version):
clang-format version 11.0.0 (https://github.com/llvm/llvm-project.git
a378c0449507e00e96534ff9ce9034e185425182)

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