<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: AlignConsecutiveAssignments interferes with AlignAfterOpenBracket=Align"
href="https://bugs.llvm.org/show_bug.cgi?id=33546">33546</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format: AlignConsecutiveAssignments interferes with AlignAfterOpenBracket=Align
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>fabian.otto@rohde-schwarz.com
</td>
</tr>
<tr>
<th>CC</th>
<td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>When an assignment is aligned because of AlignConsecutiveAssignments or
AlignConsecutiveDeclarations, additional spaces are inserted. These additional
spaces are not considered when the assignment contains a function call with
arguments that are aligned because of AlignAfterOpenBracket=Align. The function
arguments are not indented deep enough.
Version : clang-format version 5.0.0 (trunk)
Installer : LLVM-5.0.0-r303050-win32.exe
Command line : clang-format input.cpp > output.cpp
Expected output: Unchanged input.cpp
input.cpp:
==========
void f() {
short var = 0;
int i = my_function(MY_LONG_ARGUMENT_1,
MY_LONG_ARGUMENT_2,
MY_LONG_ARGUMENT_3,
MY_LONG_ARGUMENT_4);
}
output.cpp
==========
void f() {
short var = 0;
int i = my_function(MY_LONG_ARGUMENT_1,
MY_LONG_ARGUMENT_2,
MY_LONG_ARGUMENT_3,
MY_LONG_ARGUMENT_4);
}
.clang-format:
==============
---
Language: Cpp
BasedOnStyle: LLVM
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
BinPackArguments: false
...</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>