<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79834>79834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] No space between between `)` and `{` at constructor/destructor when there is a semicolon at the end.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CDAlexanderW
</td>
</tr>
</table>
<pre>
### Environment
The tested v18 clang-format executable was built from latest source of 15.01.2024.
Setting in `.clang-format` is:
```
Language: Cpp
```
### Problem
No space between between `)` and `{` at constructor/destructor when there is a semicolon at the end. A member function seems to work by adding the space, due to the fix #72733 in version 18.
```
class A {
A(){};
void b() {};
};
```
When adding something (in that case `int i;`) into the implementation, it seems to work for the constructor:
```
class A {
~A() { int i; };
void s() { int i; };
};
```
It looks like #58251 mentions clang-format "cannot determine {} as an empty function".
For our case maybe a fix of #79833 would also workaround this in case you automatically let the semicolons removed. I don't know if they are related in some way, so I tried to split them into separate issues.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VM9v6zYM_muUC1HDluPYOfiQNgtQYBgGbMA7yxYda9WPQKKT5rK_faCd5r103XYbYNiWRFL8Pn6kSskcPWIrqmdR7VdqojHE9mW_s_iuvMb4bdUFfW2FLJcHfvJnE4N36Enke5Hvfh8RCBOhhnPRQG-VPz4NITpFgO_YT6Q6i3BRCbrJWIIhBgdWsQ-kMMUeIQxQVFleZDKX62yJu7x_QyLjj2A8iE2e_RhdbHIwSZQ3S7HJb8-8_Fn546SOKModvJxOX9rc3ndsv8bQWXTL9i8B0kn1CB3SBdHfv-wut3y78npe1c_ziqAPPlGcegpRyIPGjwVcRvRAI0YEk0BBQmf6YINnLxoR0OsMduDQdRhhmHxPJnhIiC4BBbiE-AbdFZTWTAe7zNkJ-QJ6QjbhvcG8g5BlLeuyZM7OGBPHKZrsSwZ6q1KCHTCEeQNgJ2TD-OpnUe9Fed8_B6OhWw7h0-nD_-MN3xj5LesUHNLIf0I2hglhzlRCZtF4AsNRZnrB-Bsk404WWW6KGWG8hj7xMoQ4m_5I_z_I4u-A_9x9xwQfScAX2NN_2f0LC68ENoS3BNa8IVeoamRVAMMywafHrhFS9sr7QKCRMDrj8UY4qATKA7oTXe8iEVI-tMwhRAhTXIh16tohqFkYYZi1sW3KEi5hshqUTQuFKobJa6DRJJbN7HoNE6iJglNkemXtFSwuYr2rN0FEF86oM3gFzanUBG8-XMAMbHkFFREicrdrDswKgIu6chlTgFegaFBzIdPJmjm6W0qf8KSiIu6XNGHKVrot9bbcqhW2RZ1vqrJZV81qbBvdN3WTD-Var7fYNWVZbapiGCpVlLWscGVanip5IbfFWtZlnUnc6k0n60H2ed-pXqxzdMrYzNqzy0I8ruY7W2ZqvbKqQ5s-JmRs2eipm45JrHNrEqXvbmTIzrP0YUxVe_j_Z8lqirYdiU7zgJQHIQ9HQ-PUZX1wQh4459vn6RTDH9iTkIeFayEPM_S_AgAA__8H_-JV">