[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 06:30:53 PDT 2017


djasper added a comment.

Note that these changes need to be made to the corresponding comments in include/clang/Format/Format.h and then this file is auto-generated with docs/tools/dump_format_style.py.



================
Comment at: docs/ClangFormatStyleOptions.rst:274
 **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 
----------------
Much better phrasing, thank you.


================
Comment at: docs/ClangFormatStyleOptions.rst:278
+
+  This applies to declaration, whose parameters fit on a single line.
 
----------------
I think this sentence does not add value.


================
Comment at: docs/ClangFormatStyleOptions.rst:283
+    true:
+    int SomeFunctionWithVeryLooooooooongName(
+        int a, int b, int c, int d, int e, int f) {
----------------
I think we should keep the example as short as it was previously (it is reproducible with a very short column limit), but you are right that the example was broken. So I suggest making this:

  void myFunction(
      int a, int b, int c);

vs.

  void myFunction(
      int a,
      int b,
      int c);


https://reviews.llvm.org/D37513





More information about the cfe-commits mailing list