Open pohaha opened 10 months ago
I second this request. I would like both functions and member functions to have the spacing, i.e.
prefered output:
void dog (int bark) {}
void Animal::Dog (int bark) {}
and what I get with version 17.0.5
void dog (int bark) {}
void Animal::Dog(int bark) {}
notice how the space on the class member definition doesn't have the space.
Clang-Format version 18.1.8. This problem still exists now. When function is "free" , settings, like
SpaceBeforeParensOptions:
AfterFunctionDefinitionName: true
AfterFunctionDeclarationName: true
work fine. But when function is inside a class (almost everywhere), it doesn't work...
While trying to create a clang-format for our section, I have met with some difficulities, we usually add space after function definition names and after function declaration names (before parens), for both member functions and free functions, while not putting space after function name in function call
I have tried this clang-format configuration clang-format.txt
the needed parameters are the following
exactly:
preferred output is:
output i have (using clang-15, ubuntu-22.04)
note line 6: