<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 handles whitespace for "f[](x) - 7" in unexpected way"
href="https://llvm.org/bugs/show_bug.cgi?id=24355">24355</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format handles whitespace for "f[](x) - 7" in unexpected way
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andybohn@black-holes.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The incorrect behavior:
echo "f[](x) - 7" | clang-format
f[](x)-7
Similar expressions which seem to behave properly:
echo "f[]() - 7" | clang-format
f[]() - 7
echo "f[](1) - 7" | clang-format
f[](1) - 7
echo "f()[x] - 7" | clang-format
f()[x] - 7
echo "f()(x) - 7" | clang-format
f()(x) - 7
echo "f(x) - 7" | clang-format
f(x) - 7
My clang-format:
clang-format --version
Ubuntu clang-format version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final)
(based on LLVM 3.6.0)
I have not yet tried newer versions of clang-format to see if this has been
fixed. This seems to be incorrect behavior, but it's possible there's an
option to fix this.</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>