Clang-format: add finer-grained options for putting all arguments on one line
authorPaul Hoad <mydeveloperday@gmail.com>
Sat, 23 Mar 2019 14:37:58 +0000 (14:37 +0000)
committerPaul Hoad <mydeveloperday@gmail.com>
Sat, 23 Mar 2019 14:37:58 +0000 (14:37 +0000)
commitc6deae452197631a4530a50df266cdf5063b601e
treef9815ece2ce465ca648961c316fc9436ba9cc35e
parenta87ba1c59cb9f3381216cfe4e1a6a1e5425225ca
Clang-format: add finer-grained options for putting all arguments on one line

Summary:
Add 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

Reviewers: djasper, krasimir, MyDeveloperDay

Reviewed By: MyDeveloperDay

Subscribers: jkorous, MyDeveloperDay, aol-nnov, lebedev.ri, uohcsemaj, cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D40988

Patch By: russellmcc  (Russell McClellan)

llvm-svn: 356834
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/ContinuationIndenter.cpp
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTest.cpp