<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack"
href="https://bugs.llvm.org/show_bug.cgi?id=46609">46609</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Formatter
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hstong@ca.ibm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org, mydeveloperday@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>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 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
a378c0449507e00e96534ff9ce9034e185425182)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>