Skip to content

Commit

Permalink
[clang-format][docs] Fix incorrect 'clang-format 14' option markers
Browse files Browse the repository at this point in the history
Introduced by 23a5090, some style option markers indicated 'clang-format 14',
though their respective options were available in earlier releases.

Note: Even though the value type of 'SpacesInAngles' option changed,
this option has been already present since version 3.4.

Differential Revision: https://reviews.llvm.org/D118991
  • Loading branch information
kuzkry authored and owenca committed Feb 6, 2022
1 parent 977a1a5 commit 6cd0015
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions clang/docs/ClangFormatStyleOptions.rst
Expand Up @@ -2209,7 +2209,7 @@ the configuration (without a prefix: ``Auto``).
**DisableFormat** (``Boolean``) :versionbadge:`clang-format 3.7`
Disables formatting completely.

**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessModifierStyle``) :versionbadge:`clang-format 14`
**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessModifierStyle``) :versionbadge:`clang-format 13`
Defines when to put an empty line after access modifiers.
``EmptyLineBeforeAccessModifier`` configuration handles the number of
empty lines between two access modifiers.
Expand Down Expand Up @@ -2375,7 +2375,7 @@ the configuration (without a prefix: ``Auto``).
For example: BOOST_FOREACH.

**IfMacros** (``List of Strings``) :versionbadge:`clang-format 14`
**IfMacros** (``List of Strings``) :versionbadge:`clang-format 13`
A vector of macros that should be interpreted as conditionals
instead of as function calls.

Expand Down Expand Up @@ -3127,7 +3127,7 @@ the configuration (without a prefix: ``Auto``).
Add a space in front of an Objective-C protocol list, i.e. use
``Foo <Protocol>`` instead of ``Foo<Protocol>``.

**PPIndentWidth** (``Integer``) :versionbadge:`clang-format 14`
**PPIndentWidth** (``Integer``) :versionbadge:`clang-format 13`
The number of columns to use for indentation of preprocessor statements.
When set to -1 (default) ``IndentWidth`` is used also for preprocessor
statements.
Expand Down Expand Up @@ -3371,7 +3371,7 @@ the configuration (without a prefix: ``Auto``).
BasedOnStyle: llvm
CanonicalDelimiter: 'cc'
**ReferenceAlignment** (``ReferenceAlignmentStyle``) :versionbadge:`clang-format 14`
**ReferenceAlignment** (``ReferenceAlignmentStyle``) :versionbadge:`clang-format 13`
Reference alignment style (overrides ``PointerAlignment`` for
references).

Expand Down Expand Up @@ -3535,7 +3535,7 @@ the configuration (without a prefix: ``Auto``).



**ShortNamespaceLines** (``Unsigned``) :versionbadge:`clang-format 14`
**ShortNamespaceLines** (``Unsigned``) :versionbadge:`clang-format 13`
The maximal number of unwrapped lines that a short namespace spans.
Defaults to 1.

Expand Down Expand Up @@ -3969,7 +3969,7 @@ the configuration (without a prefix: ``Auto``).
} // foo
}

**SpacesInAngles** (``SpacesInAnglesStyle``) :versionbadge:`clang-format 14`
**SpacesInAngles** (``SpacesInAnglesStyle``) :versionbadge:`clang-format 3.4`
The SpacesInAnglesStyle to use for template argument lists.

Possible values:
Expand Down Expand Up @@ -4024,7 +4024,7 @@ the configuration (without a prefix: ``Auto``).
var arr = [ 1, 2, 3 ]; vs. var arr = [1, 2, 3];
f({a : 1, b : 2, c : 3}); f({a: 1, b: 2, c: 3});
**SpacesInLineCommentPrefix** (``SpacesInLineComment``) :versionbadge:`clang-format 14`
**SpacesInLineCommentPrefix** (``SpacesInLineComment``) :versionbadge:`clang-format 13`
How many spaces are allowed at the start of a line comment. To disable the
maximum set it to ``-1``, apart from that the maximum takes precedence
over the minimum.
Expand Down
14 changes: 7 additions & 7 deletions clang/include/clang/Format/Format.h
Expand Up @@ -2110,7 +2110,7 @@ struct FormatStyle {
/// Defines when to put an empty line after access modifiers.
/// ``EmptyLineBeforeAccessModifier`` configuration handles the number of
/// empty lines between two access modifiers.
/// \version 14
/// \version 13
EmptyLineAfterAccessModifierStyle EmptyLineAfterAccessModifier;

/// Different styles for empty line before access modifiers.
Expand Down Expand Up @@ -2285,7 +2285,7 @@ struct FormatStyle {
///
/// For example: `KJ_IF_MAYBE
/// <https://github.com/capnproto/capnproto/blob/master/kjdoc/tour.md#maybes>`_
/// \version 14
/// \version 13
std::vector<std::string> IfMacros;

/// \brief A vector of macros that should be interpreted as type declarations
Expand Down Expand Up @@ -2956,7 +2956,7 @@ struct FormatStyle {
/// # define BAR
/// #endif
/// \endcode
/// \version 14
/// \version 13
int PPIndentWidth;

/// See documentation of ``RawStringFormats``.
Expand Down Expand Up @@ -3042,7 +3042,7 @@ struct FormatStyle {

/// \brief Reference alignment style (overrides ``PointerAlignment`` for
/// references).
/// \version 14
/// \version 13
ReferenceAlignmentStyle ReferenceAlignment;

// clang-format off
Expand Down Expand Up @@ -3193,7 +3193,7 @@ struct FormatStyle {
/// int bar; int bar;
/// } // namespace b } // namespace b
/// \endcode
/// \version 14
/// \version 13
unsigned ShortNamespaceLines;

/// Include sorting options.
Expand Down Expand Up @@ -3610,7 +3610,7 @@ struct FormatStyle {
SIAS_Leave
};
/// The SpacesInAnglesStyle to use for template argument lists.
/// \version 14
/// \version 3.4
SpacesInAnglesStyle SpacesInAngles;

/// If ``true``, spaces will be inserted around if/for/switch/while
Expand Down Expand Up @@ -3678,7 +3678,7 @@ struct FormatStyle {
/// /// - Foo /// - Foo
/// /// - Bar /// - Bar
/// \endcode
/// \version 14
/// \version 13
SpacesInLineComment SpacesInLineCommentPrefix;

/// If ``true``, spaces will be inserted after ``(`` and before ``)``.
Expand Down

0 comments on commit 6cd0015

Please sign in to comment.