[clang-format] AllowShortFunctionsOnASingleLine not respected
Open
clang-format
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I have recently updated clang-format to 22.1.1. I have since experienced unexpected changes in formatting despite maintaining unchanged `.clang-format`. Prior to the update my code (C++) looked as follows:
```cpp
static f64 _determinant2x2(f64 m00, f64 m01, f64 m10, f64 m11)
{
return m00 * m11 - m01 * m10;
}
```
After the update clang-format has been consistently insisting on formatting it as such
```cpp
static f64 _determinant2x2(f64 m00, f64 m01, f64 m10, f64 m11)
{ return m00 * m11 - m01 * m10; }
```
I believe the culprit here is `AllowShortFunctionsOnASingleLine: Empty` which has stopped working.
Contributor guide
Assessment
This issue has not been assessed yet.