Index: docs/ClangFormatStyleOptions.rst =================================================================== --- docs/ClangFormatStyleOptions.rst +++ docs/ClangFormatStyleOptions.rst @@ -271,15 +271,22 @@ int b = 2; // comment b int b = 2; // comment about b **AllowAllParametersOfDeclarationOnNextLine** (``bool``) - Allow putting all parameters of a function declaration onto + If the function declaration doesn't fit on a line, + allow putting all parameters of a function declaration onto the next line even if ``BinPackParameters`` is ``false``. .. code-block:: c++ - true: false: - myFunction(foo, vs. myFunction(foo, bar, plop); - bar, - plop); + true: + void myFunction( + int a, int b, int c, int d, int e); + + false: + void myFunction(int a, + int b, + int c, + int d, + int e); **AllowShortBlocksOnASingleLine** (``bool``) Allows contracting simple braced statements to a single line. Index: include/clang/Format/Format.h =================================================================== --- include/clang/Format/Format.h +++ include/clang/Format/Format.h @@ -151,13 +151,20 @@ /// \endcode bool AlignTrailingComments; - /// \brief Allow putting all parameters of a function declaration onto + /// \brief If the function declaration doesn't fit on a line, + /// allow putting all parameters of a function declaration onto /// the next line even if ``BinPackParameters`` is ``false``. /// \code - /// true: false: - /// myFunction(foo, vs. myFunction(foo, bar, plop); - /// bar, - /// plop); + /// true: + /// void myFunction( + /// int a, int b, int c, int d, int e); + /// + /// false: + /// void myFunction(int a, + /// int b, + /// int c, + /// int d, + /// int e); /// \endcode bool AllowAllParametersOfDeclarationOnNextLine;