Clang-format: add finer-grained options for putting all arguments on one line.

Russell McClellan via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 15:55:24 PST 2017


Attached is a patch that adds two new options,
AllowAllArgumentsOnNextLine and
AllowAllConstructorInitializersOnNextLine.  These mirror the existing
AllowAllParametersOfDeclarationOnNextLine and allow me to support an
internal style guide where I work.  I think this would be generally
useful, some have asked for it on stackoverflow:

https://stackoverflow.com/questions/30057534/clang-format-binpackarguments-not-working-as-expected

https://stackoverflow.com/questions/38635106/clang-format-how-to-prevent-all-function-arguments-on-next-line

Thanks for your consideration, and let me know if there's anything I
can do to improve the patch; I'm a first-time contributor.

Thanks,
-Russell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: format-allownextline.patch
Type: application/octet-stream
Size: 8769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171113/d43ae8ff/attachment-0001.obj>


More information about the cfe-commits mailing list