You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Clang-Format with C it seems that function pointers are handled improperly. A break is inserted before the closing parenthesis after pointer name. It seems that the variable name is treated as an argument and shenanigans ensue.
Consider the following code - this is how clang-format formats it right now:
int (*tps25750_write
)(void*ctx,
uint8_ttps_address,
uint8_treg_address,
uint8_tbyte_count,
uint8_t*buffer);
I would expect it to look like this, closer to a function declaration (all my indents are set to 4 spaces):
int (*tps25750_write)(
void*ctx,
uint8_ttps_address,
uint8_treg_address,
uint8_tbyte_count,
uint8_t*buffer
);
When using Clang-Format with C it seems that function pointers are handled improperly. A break is inserted before the closing parenthesis after pointer name. It seems that the variable name is treated as an argument and shenanigans ensue.
Consider the following code - this is how clang-format formats it right now:
I would expect it to look like this, closer to a function declaration (all my indents are set to 4 spaces):
Full
. That file mistakenly contained options from Clang-Format 16. Current file which actually works with Clan-Format 14.clang-format
The text was updated successfully, but these errors were encountered: