Skip to content

Commit 1d65304

Browse files
committed
Move clang-format off and clang-format on comments outside of the enum and re-generate documentation.
1 parent 159281a commit 1d65304

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5209,7 +5209,7 @@ the configuration (without a prefix: ``Auto``).
52095209

52105210
Possible values:
52115211

5212-
* ``// clang-format on`` (in configuration: ``// clang-format on``)
5212+
* ``RCS_Never`` (in configuration: ``Never``)
52135213
Leave comments untouched.
52145214

52155215
.. code-block:: c++
@@ -5219,7 +5219,7 @@ the configuration (without a prefix: ``Auto``).
52195219
/* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
52205220
* and a misaligned second line */
52215221
5222-
* ``// clang-format on`` (in configuration: ``// clang-format on``)
5222+
* ``RCS_IndentOnly`` (in configuration: ``IndentOnly``)
52235223
Only apply indentation rules, moving comments left or right, without
52245224
changing formatting inside the comments.
52255225

@@ -5230,7 +5230,7 @@ the configuration (without a prefix: ``Auto``).
52305230
/* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
52315231
* and a misaligned second line */
52325232
5233-
* ``// clang-format on`` (in configuration: ``// clang-format on``)
5233+
* ``RCS_Always`` (in configuration: ``Always``)
52345234
Apply indentation rules and re-flow long comments into new lines, trying
52355235
to obey the ``ColumnLimit``.
52365236

clang/include/clang/Format/Format.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3749,19 +3749,17 @@ struct FormatStyle {
37493749
/// \version 13
37503750
ReferenceAlignmentStyle ReferenceAlignment;
37513751

3752+
// clang-format off
37523753
/// \brief Types of comment re-flow style.
37533754
enum ReflowCommentsStyle : int8_t {
3754-
// clang-format off
37553755
/// Leave comments untouched.
37563756
/// \code
37573757
/// // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
37583758
/// /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information */
37593759
/// /* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
37603760
/// * and a misaligned second line */
37613761
/// \endcode
3762-
// clang-format on
37633762
RCS_Never,
3764-
// clang-format off
37653763
/// Only apply indentation rules, moving comments left or right, without
37663764
/// changing formatting inside the comments.
37673765
/// \code
@@ -3770,9 +3768,7 @@ struct FormatStyle {
37703768
/// /* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
37713769
/// * and a misaligned second line */
37723770
/// \endcode
3773-
// clang-format on
37743771
RCS_IndentOnly,
3775-
// clang-format off
37763772
/// Apply indentation rules and re-flow long comments into new lines, trying
37773773
/// to obey the ``ColumnLimit``.
37783774
/// \code
@@ -3783,9 +3779,9 @@ struct FormatStyle {
37833779
/// /* third veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of
37843780
/// * information and a misaligned second line */
37853781
/// \endcode
3786-
// clang-format on
37873782
RCS_Always
37883783
};
3784+
// clang-format on
37893785

37903786
/// \brief Comment reformatting style.
37913787
/// \version 3.8

0 commit comments

Comments
 (0)