[PATCH] D137865: [clang-format][NFC] Improve documentation on ReflowComments

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 13 17:59:33 PST 2022


owenpan added inline comments.


================
Comment at: clang/include/clang/Format/Format.h:3073-3076
+  /// If ``true``, clang-format will attempt to re-flow comments. That is it
+  /// will touch a comment and *reflow* long comments into new lines, trying to
+  /// obey the ``ColumnLimit``. ``/*`` comments will get a leading ``*`` on the
+  /// new lines.
----------------
Let's leave it as is because the new lines don't always get a leading `*`:
```
$ cat foo.cpp
/* The LLVM Project is a collection of modular and reusable compiler and toolchain
   technologies. */
$ clang-format -style='{ReflowComments: true}' foo.cpp
/* The LLVM Project is a collection of modular and reusable compiler and
   toolchain technologies. */
```


================
Comment at: clang/include/clang/Format/Format.h:3864
   /// \endcode
+  /// This option has only effect if ``ReflowComments`` is set to ``true``.
   /// \version 13
----------------
We need an empty line after `/// \endcode`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137865/new/

https://reviews.llvm.org/D137865



More information about the cfe-commits mailing list