<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57105>57105</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format: SpaceBeforeBraces option feature request
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
thezealousfool
</td>
</tr>
</table>
<pre>
Similar to `SpaceBeforeParens`, we can have another option `SpaceBeforeBraces`. It will not apply at places where BreakBeforeBraces is true but will let us choose for other places.
For eg., With `BreakBeforeBraces: Linux` and `SpaceBeforeBraces: Never`
```c
void foo()
{
if(true) {
printf("Bar\n");
}
}
```
will change
```c
if(true){
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUtuOmzAQ_RrzMlpkzCXJAw_LRitVqqpK-9BnYwZw62Bqm6Tbr-8YNuneJAvO-MzlzIxb2z3XT_qkjXQQLLCKP81SYYO9dfhdOpw83THxABcEJScY5RlBTjaM6MDOQdvpXVTjCMaoFL4EuGhjgNxBzrN5BhlgNpGHCyVAaBzKX6_jQHsIbkFol5dggwEWD2q01iOQJ2zFtzwp40fG77fvI5E4pFHuDx3GKOxDAZbfw1c9LX-IpEa6z9WT0zc8o4vNbwUIrEdt9tnqjsRYJvZMHF58ds0GAHRPROyDSHh1DzA7PYV-DRONdKx8mAjFHPnNi-2O14zHd-U3cx2MGuU04Ofy3iq4Cbi5JVhnVcVFJcoiS7o67w75QSZBB4O1MpT4jqZxkiFO4sN4rovvUYaFtujw94I-JIsz9RjCHOfHxCOdgdawtKmyJzKMOV9_d7OzP1EFMrX3FEyg3GW8TMZa9X2fIS-x3--7vN-posoLxKzKZEQiMbJF42tWNqw8JroWXAi-zwTnEaRd3omiL7J9W3ZK5AdWcDxJbdJYOLVuSFy9amiXwRNptA_-Pym918OEeM0vlzBaV9Ob-4vS2MXT1k2yqq5Xyf8AF8v_7g">