<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] Different formatted output can be produced from varying whitespace"
href="https://bugs.llvm.org/show_bug.cgi?id=48891">48891</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[clang-format] Different formatted output can be produced from varying whitespace
</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>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</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>leonardchan@google.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>As of <a href="https://reviews.llvm.org/D93839">https://reviews.llvm.org/D93839</a>, clang-format can produce different
formatted files depending on amount of whitespace. For example, given (A):
```
#include <stdint.h>
namespace fuzzing {}
```
`clang-format` with this patch would produced (B):
```
#include <stdint.h>
namespace fuzzing {
}
```
but given (C):
```
#include <stdint.h>
namespace fuzzing {
}
```
would be formatted to (D):
```
#include <stdint.h>
namespace fuzzing {
}
```
The invocation specifically is `clang-format --style=google file`. Prior to
this patch, both inputs (A/C) would give the same output:
```
#include <stdint.h>
namespace fuzzing {}
```
This seems to be unintended behavior that should be fixed. This doesn't seem to
occur if `#include "stdint.h"` is used.</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>