https://llvm.org/bugs/show_bug.cgi?id=28762
Bug ID: 28762 Summary: clang-format: add a style option for disabling all function arguments on one line Product: new-bugs Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: jaco...@google.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The style option `AllowAllParametersOfDeclarationOnNextLine` allows me to prevent clang-format from pulling all parameters in a function declaration onto a single line when I have intentionally put them on separate lines. This is great. But there doesn't appear to be a corresponding option for function calls. `clang-format` is happy to pull function arguments onto a single line, even when I've intentionally put them on separate lines and disabled bin packing. Small example that reproduces this: % cat .clang-format ColumnLimit: 80 BinPackArguments: false BinPackParameters: false AllowAllParametersOfDeclarationOnNextLine: false AlignAfterOpenBracket: AlwaysBreak % cat foo.cc extern int arg_0, arg_1, arg_2; void DoSomethingWithThreeIntsThatRequiresAVeryLongFunctionNameSeriouslyLong( int a, int b, int c); void foo() { // I'm intentionally putting these one per line; I want them to align. DoSomethingWithThreeIntsThatRequiresAVeryLongFunctionNameSeriouslyLong( arg_0, arg_1, arg_2); } % clang-format -style=file foo.cc extern int arg_0, arg_1, arg_2; void DoSomethingWithThreeIntsThatRequiresAVeryLongFunctionNameSeriouslyLong( int a, int b, int c); void foo() { // I'm intentionally putting these one per line; I want them to align. DoSomethingWithThreeIntsThatRequiresAVeryLongFunctionNameSeriouslyLong( arg_0, arg_1, arg_2); } -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs