clang-format for old-style K&R function definitions

Viewed 429

Working on a very old codebase using pre-ANSI C conventions, I'd like clang-format to produce an output like

int
main(argc, argv)
int argc;
char *argv[];
{
    return 0;
}

Unfortunately, it insists on formatting this as

int main(argc, argv) int argc;
char *argv[];
{
    return 0;
}

Is there a way to make it put each declaration on its own line?

0 Answers
Related