Good afternoon, tell me, please, how to write the config for clang-format correctly so that the transfer of long lines is carried out with a comma, and not after? I did not find the corresponding parameter in clang-format.

For example, there is the source line:

unsigned long long int Fooooooooooooo(int a, int b, int c, int d, int e, int f, int g) { return 0; } 

If the line with the code has a length greater than N, clang-format will break it as follows:

 unsigned long long int Fooooooooooooo(int a, int b, int c, int d, int e, int f, int g) { return 0; } 

And I want to break it like this:

 unsigned long long int Fooooooooooooo(int a, int b, int c , int d, int e, int f, int g) { return 0; } 

The most important thing in this case is the position of the comma when the line breaks (after int c). Everything else I will customize to fit my needs. The position of a comma is critical, since there is a code-style, and he used to write like that.

I will be glad to your advice!

  • BreakBeforeInheritanceComma - diraria may help
  • @diraria, unfortunately the BreakBeforeInheritanceComma parameter did n't save - MeatBoy

0