[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine
Lucja Mazur via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 6 06:15:28 PDT 2017
LuMa updated this revision to Diff 113998.
https://reviews.llvm.org/D37513
Files:
docs/ClangFormatStyleOptions.rst
Index: docs/ClangFormatStyleOptions.rst
===================================================================
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -271,15 +271,29 @@
int b = 2; // comment b int b = 2; // comment about b
**AllowAllParametersOfDeclarationOnNextLine** (``bool``)
- Allow putting all parameters of a function declaration onto
- the next line even if ``BinPackParameters`` is ``false``.
+ If the function declaration doesn't fit on a line,
+ allow putting all parameters onto the next line
+ even if ``BinPackParameters`` is ``false``.
+
+ This applies to declaration, whose parameters fit on a single line.
.. code-block:: c++
- true: false:
- myFunction(foo, vs. myFunction(foo, bar, plop);
- bar,
- plop);
+ true:
+ int SomeFunctionWithVeryLooooooooongName(
+ int a, int b, int c, int d, int e, int f) {
+ return 0;
+ }
+
+ false:
+ int SomeFunctionWithVeryLooooooooongName(int a,
+ int b,
+ int c,
+ int d,
+ int e,
+ int f) {
+ return 0;
+ }
**AllowShortBlocksOnASingleLine** (``bool``)
Allows contracting simple braced statements to a single line.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37513.113998.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170906/c3795a58/attachment.bin>
More information about the cfe-commits
mailing list