[llvm-bugs] [Bug 46609] New: clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 6 14:00:52 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org, mydeveloperday at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200706/c436077e/attachment.html>
More information about the llvm-bugs
mailing list