Regardless of the length of the line, I want clang-format to split a function’s parameters into separate lines. I have managed to partially achieve this using
AlignAfterOpenBracket: BlockIndent BinPackArguments: false BinPackParameters: false AlignConsecutiveAssignments: AcrossEmptyLinesAndComments AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments
but this works only if the line is long. I want to maintain a uniform style where the line is always broken after the opening parenthesis and before the closing parenthesis. Something like this,
void AES_ecb_128_encrypt_gpu ( const u8 *in_h, u8 *out_h, const AES_KEY *expanded_key_h, cudaStream_t stream, unsigned long aes_block_count, const unsigned int threads_per_blk )
This should also apply to a short function signature like this:
void func( int param, int param2 )
How do I achieve this?
EDIT: Attaching a StackOverflow question asking for the same thing with an answer that says it’s not possible.
If this is indeed impossible, what do I need to modify in the sources to get this?