[PATCH] D137865: [clang-format][NFC] Improve documentation on ReflowComments
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 22:02:54 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG40c1476e3ae2: [clang-format][NFC] Improve documentation on ReflowComments (authored by HazardyKnusperkeks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137865/new/
https://reviews.llvm.org/D137865
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
Index: clang/include/clang/Format/Format.h
===================================================================
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -3070,7 +3070,9 @@
ReferenceAlignmentStyle ReferenceAlignment;
// clang-format off
- /// If ``true``, clang-format will attempt to re-flow comments.
+ /// 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``.
/// \code
/// false:
/// // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
@@ -3821,7 +3823,7 @@
/// \version 3.7
bool SpacesInCStyleCastParentheses;
- /// Control of spaces within a single line comment
+ /// Control of spaces within a single line comment.
struct SpacesInLineComment {
/// The minimum number of spaces at the start of the comment.
unsigned Minimum;
@@ -3858,6 +3860,8 @@
/// /// - Foo /// - Foo
/// /// - Bar /// - Bar
/// \endcode
+ ///
+ /// This option has only effect if ``ReflowComments`` is set to ``true``.
/// \version 13
SpacesInLineComment SpacesInLineCommentPrefix;
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -3795,7 +3795,9 @@
**ReflowComments** (``Boolean``) :versionbadge:`clang-format 3.8`
- If ``true``, clang-format will attempt to re-flow comments.
+ 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``.
.. code-block:: c++
@@ -4610,9 +4612,11 @@
/// - Foo /// - Foo
/// - Bar /// - Bar
+ This option has only effect if ``ReflowComments`` is set to ``true``.
+
Nested configuration flags:
- Control of spaces within a single line comment
+ Control of spaces within a single line comment.
* ``unsigned Minimum`` The minimum number of spaces at the start of the comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137865.475681.patch
Type: text/x-patch
Size: 2302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221116/2a0b9c57/attachment.bin>
More information about the cfe-commits
mailing list