<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62089>62089</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format inserts pointless newline after Java "public record" when BinPackParameters false
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sh-at-cs
</td>
</tr>
</table>
<pre>
Consider a Java file `MyRecord.java`:
```java
public record MyRecord(
String s1, String s2, String s3, String s4, String s5, String s6
) {
}
```
With `BinPackParameters: false`, `clang-format` formats this like this:
```java
public record
MyRecord(String s1, String s2, String s3, String s4, String s5, String s6) {}
```
I don't think putting `public record` on its own line is intentional (it doesn't do this with a public class instead of a record). Most likely it just doesn't understand `record` types in Java (which were introduced in Java 14) and does something weird as a result.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysU02L4zgQ_TXypUiQ5cSxDz70B4FdaGh2D3uWrXKsbkUKqnKb_PtFdtLtnoGBgQFj60l6z6-eVJrInjxiI_aPYv-c6ZGHEBsaNpo3HWVtMNfmKXiyBiNo-Ft_aOitQxClfLn-g12IZvumP7QopSgehHwW8v4u5fLMy_PUZWyd7SDONLjzhaqWZQCAfzlafwLKhXr6BGoNijXYrcF-DcqbC1WDODzewOH5B29rw_9ZHlJdj9a_6u79VUd9RsZIoniAXjvCRFBPaU_ntD9t-hDPmkUpYRkR8GAJnH3HefSbiSxTq1j-YBi3GH4ZwF9gghfqwMm8f4fLyJzoopTffZYSggfLBGHy4KxHsATWM3q2wWsHQlWWwQSkRdCEJZopZazhJtc5TYlHjNpA6EHf_6DqLbwE4jlLdwXL8DbSWnH0BiOx9ib5-zLG1wsmzeWuClVNg-0GmDBichiDGTs0nxvyXYomqSRpoHDGVPwJJrTRgKbZE42Ot5lpClMXtc6wycsqV7Wsyzwbmrozui0Pva5bmZdtq8r2sMvruqiKQ2-MzGyjpCrkLleyzkuZbw-1MZUsqrw23X6nerGTeNbWbZ37OG9DPGWWaMSmVLKqM6dbdDT3qFIeJ5gXhVKpZWOTOJt2PJHYSWeJ6UuFLTts1pc1pY2RCS7BenZIBB6n-Qh1zxjvsanvJ64UTAN6-Kk3lsbIxuiagfkyX3l1FOp4sjyM7bYLZ6GOydDts7nE8IYdC3WcyyChjnOZ_wcAAP__24xufA">