Author: Krystian Kuzniarek Date: 2022-02-20T22:33:27+01:00 New Revision: 8f310d1967c20d348c617af3a30999031c71fee0
URL: https://github.com/llvm/llvm-project/commit/8f310d1967c20d348c617af3a30999031c71fee0 DIFF: https://github.com/llvm/llvm-project/commit/8f310d1967c20d348c617af3a30999031c71fee0.diff LOG: [clang-format][docs] Fix incorrect 'clang-format 13' configuration ... ...options markers Note: Option 'IndentRequiresClause' was previously known as 'IndentRequires' but the version marker should still indicate 'clang-format 15' as this option most recent name wasn't accessible earlier and it would produce: error: unknown key 'IndentRequiresClause' Differential Revision: https://reviews.llvm.org/D119682 Added: Modified: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h Removed: ################################################################################ diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index 8d6c80fb87e5..0cddf022ead3 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -1988,7 +1988,7 @@ the configuration (without a prefix: ``Auto``). -**BreakBeforeConceptDeclarations** (``BreakBeforeConceptDeclarationsStyle``) :versionbadge:`clang-format 13` +**BreakBeforeConceptDeclarations** (``BreakBeforeConceptDeclarationsStyle``) :versionbadge:`clang-format 12` The concept declaration style to use. Possible values: @@ -2278,7 +2278,7 @@ the configuration (without a prefix: ``Auto``). -**EmptyLineBeforeAccessModifier** (``EmptyLineBeforeAccessModifierStyle``) :versionbadge:`clang-format 13` +**EmptyLineBeforeAccessModifier** (``EmptyLineBeforeAccessModifierStyle``) :versionbadge:`clang-format 12` Defines in which cases to put empty line before access modifiers. Possible values: @@ -2706,10 +2706,12 @@ the configuration (without a prefix: ``Auto``). -**IndentRequiresClause** (``Boolean``) :versionbadge:`clang-format 13` +**IndentRequiresClause** (``Boolean``) :versionbadge:`clang-format 15` Indent the requires clause in a template. This only applies when ``RequiresClausePosition`` is ``OwnLine``, or ``WithFollowing``. + In clang-format 13 and 14 it was named ``IndentRequires``. + .. code-block:: c++ true: diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index c86a70009716..d4a479e7c512 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -1791,7 +1791,7 @@ struct FormatStyle { }; /// The concept declaration style to use. - /// \version 13 + /// \version 12 BreakBeforeConceptDeclarationsStyle BreakBeforeConceptDeclarations; /// If ``true``, ternary operators will be placed after line breaks. @@ -2185,7 +2185,7 @@ struct FormatStyle { }; /// Defines in which cases to put empty line before access modifiers. - /// \version 13 + /// \version 12 EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier; /// If ``true``, clang-format detects whether function calls and @@ -2523,6 +2523,8 @@ struct FormatStyle { /// Indent the requires clause in a template. This only applies when /// ``RequiresClausePosition`` is ``OwnLine``, or ``WithFollowing``. + /// + /// In clang-format 13 and 14 it was named ``IndentRequires``. /// \code /// true: /// template <typename It> @@ -2538,7 +2540,7 @@ struct FormatStyle { /// //.... /// } /// \endcode - /// \version 13 + /// \version 15 bool IndentRequiresClause; /// The number of columns to use for indentation. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits