I got this from clang-format --style=LLVM -i a.c:
void a() {
#if __linux__
if (addr.sun_path[0] == '@') // linux abstract socket
addr.sun_path[0] = '\0';
else
#endif
if (stat(unix, &sb) && S_ISSOCK(sb.st_mode))
unlink(unix);
}
the correct formatting would be
void a() {
#if __linux__
if (addr.sun_path[0] == '@') // linux abstract socket
addr.sun_path[0] = '\0';
else
#endif
if (stat(unix, &sb) && S_ISSOCK(sb.st_mode))
unlink(unix);
}
or maybe
void a() {
#if __linux__
if (addr.sun_path[0] == '@') // linux abstract socket
addr.sun_path[0] = '\0';
else
#endif
if (stat(unix, &sb) && S_ISSOCK(sb.st_mode))
unlink(unix);
}
but definitely not the first one.
Debian clang-format version 21.0.0 (++20250519112653+d0ee35851bb9-1exp120250519112844.1459)