<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 - Ignore new line in AlignConsecutiveDeclarations and AlignConsecutiveAssignments"
href="https://bugs.llvm.org/show_bug.cgi?id=40115">40115</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Ignore new line in AlignConsecutiveDeclarations and AlignConsecutiveAssignments
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>Keywords</th>
<td>code-cleanup, code-quality
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>marcin.sus@gmail.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>It would be nice to have separate option to alter how
AlignConsecutiveDeclarations and AlignConsecutiveAssignments treat empty lines.
Now clang-format with both options enabled formats following code like this:
virtual std::string Test1(const double** pBuf) = 0;
virtual bool Test2() = 0;
// empty line or comment
virtual void Test3(T t) = 0;
virtual std::vector<td::string> Test4(T t) = 0;
Sometimes you want to separate groups of methods with empty line (or comment)
but keep proper alignment across all declrations.
virtual std::string Test1(const double** pBuf) = 0;
virtual bool Test2() = 0;
// empty line or coment
virtual void Test3(T t) = 0;
virtual std::vector<td::string> Test4(T t) = 0;
So in general format skiping empty lines (AlignConsecutiveLinesNumAllowed: n)
It would be very convenient to have it at least in class/struct declarations.
Can I modify clang-format to support this feature?
Thanks</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>