<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJy1U01v4jAQ_TXJZVQUHELJIYcEFqnSSistB85OMiRuTRz5oyz_fsemLFDa3cOqkgV23sybN57nWrXHYtvjAE-wU3rPLdheGMBffD9KhEa1GKVllKyipIzmydsKR2O1ayycwcfqtAEQgwURpdUZWF3214kV-Jw7tJHcGFjesb4q0ZJGFbFFxPK_0J8IVnfst-q3wvanXunThHKG7uF0A3SGnZCf9l1p3uBW83EUQ_cnCMqdRb30tekbUIt4DWxCz--QzSiF_bYf7fEnNkq3Ht5xafC6nUojf6mQtGGoHOiXzli1_1DeE3T4NkXXySNoNE7aLxviJfHLJvlxifddH5STLUjxgtQ8avpVUCPwAdRohRr8mUupDoD-xuHUgKGAFkIhNEBRHAyNlawvxYBAEo0ivvAu8OZZAF2wxJ0FNzQ9uQdbagaeaTAnEcL6iFEZI2pKOXi_7SjWazFQH8H5Qt59pVe16ZW26zP-Yyg3QcZ3UuENGrdF2uZpzmPuLIUWZcv3lWuE0rHTsuitHb0zIram1VExV08asghbS_l6_nsYtXpG8iFbC2MceYmtszSfJ3Ff5NjWj3PMmmk-TXCKTZ1m89mMLWqezDDJY8lrlKaIsipibMADBAraR9kq_n8FomAJC2s6Z7NsOmGswWyBsyRJOONZE80S3HMhJ55nonQX6yJQ1q4zBEphrLmANFHRDYhBMCm0wkosbh46PaTy34648kMcNBdB8G_tb49m>53960</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format: Allow empty structs and classes on single line
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AdamBucior
</td>
</tr>
</table>
<pre>
When I format this example code:
```
struct A
{
int i;
};
struct B {};
class C
{
void foo();
};
class D {};
```
With this `.clang-format` file:
```
BraceWrapping:
AfterClass: true
AfterStruct: true
SplitEmptyRecord: false
BreakBeforeBraces: Custom
```
I get this ugly result:
```
struct A
{
int i;
};
struct B
{};
class C
{
void foo();
};
class D
{};
```
I would like there to be an option to allow empty structs and classes on a single line (so that the example code is left unchanged) just like it is possible with functions by using `AllowShortFunctionsOnASingleLine`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U8tuozAU_RrYXDUCJ7RhwQKaiVRppJEmi64NvoBbByM_msnfz7XTTNLHzKwqWWBz7uMc30OrxbF6HHGCB-i12XMHbpQW8Bffzwqh0wKTZZ1kmySrk9vsdcWjdcZ3Ds7gXXPaAMjJgUyWzRnYXPbXiQ2EnA9op7i1cP-h6ouWgjjqhK0TVv6j_KnA5kP1t-wfpRtPWunTgnKm4eZ0A3SGXqq_6m4M7_DR8HmW0_AnCOreobkPvekbkES8BnZR8ztkNyvpvu1nd_yJnTYiwD1XFq_lNAb5c4PEDWPnWP7eW6f3n9J7gAFfp-gHdQSD1iv3ZUO8JH7ZJD9v8V71QXslQMlnJPFo6KmhReAT6NlJPYUzV0ofAMONw0mApQABsRFaoCgOlsZK1ldyQiCKVlO9-F_gm98C6IIV9g781I3kHhQkBp5oMCcS0oWIWVsrW0o5BL_1FBu4WGiP4EOj4L46sNqN2rjtGf8x1btI4zuxCAZNRbUU5bLkqZNOYfXGsGSI-v_KrnSl3qhqdG4OZkrYltZA_Hy76MhVbKvUy_l1Mxv9hGRdtpXWerIf2xbL8jZLxwq7Ja4KLkTer0rMuywXdyUriyLPOF_nq1TxFpWtkqJJGJvwALEE7ZNik8qKZSyu_JatinzBWIfFGldZlnHGiy5ZZbjnUi0Cj4U2Q2qqSKn1gyVQSevsBSShcpgQYzuqz72jO61qwfeN76Q2aexeRfa_AbSoees">