diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -247,7 +247,7 @@ -**AlignConsecutiveAssignments** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 13` +**AlignConsecutiveAssignments** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 3.8` Style of aligning consecutive assignments. ``Consecutive`` will result in formattings like: @@ -320,7 +320,7 @@ /* A comment. */ double e = 4; -**AlignConsecutiveBitFields** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 13` +**AlignConsecutiveBitFields** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 11` Style of aligning consecutive bit field. ``Consecutive`` will align the bitfield separators of consecutive lines. @@ -394,7 +394,7 @@ /* A comment. */ int ee : 3; -**AlignConsecutiveDeclarations** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 13` +**AlignConsecutiveDeclarations** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 3.8` Style of aligning consecutive declarations. ``Consecutive`` will align the declaration names of consecutive lines. @@ -468,7 +468,7 @@ /* A comment. */ bool c = false; -**AlignConsecutiveMacros** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 13` +**AlignConsecutiveMacros** (``AlignConsecutiveStyle``) :versionbadge:`clang-format 9` Style of aligning consecutive macro definitions. ``Consecutive`` will result in formattings like: @@ -1082,7 +1082,7 @@ -**AttributeMacros** (``List of Strings``) :versionbadge:`clang-format 13` +**AttributeMacros** (``List of Strings``) :versionbadge:`clang-format 12` A vector of strings that should be interpreted as attributes/qualifiers instead of identifiers. This can be useful for language extensions or static analyzer annotations. @@ -1135,7 +1135,7 @@ int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {} -**BitFieldColonSpacing** (``BitFieldColonSpacingStyle``) :versionbadge:`clang-format 13` +**BitFieldColonSpacing** (``BitFieldColonSpacingStyle``) :versionbadge:`clang-format 12` The BitFieldColonSpacingStyle to use for bitfields. Possible values: @@ -3197,7 +3197,7 @@ **PenaltyExcessCharacter** (``Unsigned``) :versionbadge:`clang-format 3.7` The penalty for each character outside of the column limit. -**PenaltyIndentedWhitespace** (``Unsigned``) :versionbadge:`clang-format 13` +**PenaltyIndentedWhitespace** (``Unsigned``) :versionbadge:`clang-format 12` Penalty for each character of whitespace indentation (counted relative to leading non-whitespace column). @@ -3301,8 +3301,9 @@ * type Note: it MUST contain 'type'. - Items to the left of 'type' will be placed to the left of the type and aligned in the order supplied. - Items to the right of 'type' will be placed to the right of the type and aligned in the order supplied. + Items to the left of 'type' will be placed to the left of the type and + aligned in the order supplied. Items to the right of 'type' will be placed + to the right of the type and aligned in the order supplied. .. code-block:: yaml @@ -3461,7 +3462,7 @@ -**SortJavaStaticImport** (``SortJavaStaticImportOptions``) :versionbadge:`clang-format 13` +**SortJavaStaticImport** (``SortJavaStaticImportOptions``) :versionbadge:`clang-format 12` When sorting Java imports, by default static imports are placed before non-static imports. If ``JavaStaticImportAfterImport`` is ``After``, static imports are placed after non-static imports. @@ -3529,7 +3530,7 @@ true: false: template void foo(); vs. template void foo(); -**SpaceAroundPointerQualifiers** (``SpaceAroundPointerQualifiersStyle``) :versionbadge:`clang-format 13` +**SpaceAroundPointerQualifiers** (``SpaceAroundPointerQualifiersStyle``) :versionbadge:`clang-format 12` Defines in which cases to put a space before or after pointer qualifiers Possible values: @@ -3578,7 +3579,7 @@ int a = 5; vs. int a= 5; a += 42; a+= 42; -**SpaceBeforeCaseColon** (``Boolean``) :versionbadge:`clang-format 13` +**SpaceBeforeCaseColon** (``Boolean``) :versionbadge:`clang-format 12` If ``false``, spaces will be removed before case colon. .. code-block:: c++ @@ -3893,7 +3894,7 @@ -**StatementAttributeLikeMacros** (``List of Strings``) :versionbadge:`clang-format 13` +**StatementAttributeLikeMacros** (``List of Strings``) :versionbadge:`clang-format 12` Macros which are ignored in front of a statement, as if they were an attribute. So that they are not parsed as identifier, for example for Qts emit. diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -208,7 +208,7 @@ /// /* some comment */ /// #define bar(y, z) (y + z) /// \endcode - /// \version 13 + /// \version 9 AlignConsecutiveStyle AlignConsecutiveMacros; /// Style of aligning consecutive assignments. @@ -277,7 +277,7 @@ /// /* A comment. */ /// double e = 4; /// \endcode - /// \version 13 + /// \version 3.8 AlignConsecutiveStyle AlignConsecutiveAssignments; /// Style of aligning consecutive bit field. @@ -347,7 +347,7 @@ /// /* A comment. */ /// int ee : 3; /// \endcode - /// \version 13 + /// \version 11 AlignConsecutiveStyle AlignConsecutiveBitFields; /// Style of aligning consecutive declarations. @@ -417,7 +417,7 @@ /// /* A comment. */ /// bool c = false; /// \endcode - /// \version 13 + /// \version 3.8 AlignConsecutiveStyle AlignConsecutiveDeclarations; /// Different styles for aligning escaped newlines. @@ -930,7 +930,7 @@ /// AttributeMacros: ['__capability', '__output', '__ununsed'] /// \endcode /// - /// \version 13 + /// \version 12 std::vector AttributeMacros; /// If ``false``, a function call's arguments will either be all on the @@ -1919,8 +1919,9 @@ /// * type /// /// Note: it MUST contain 'type'. - /// Items to the left of 'type' will be placed to the left of the type and aligned in the order supplied. - /// Items to the right of 'type' will be placed to the right of the type and aligned in the order supplied. + /// Items to the left of 'type' will be placed to the left of the type and + /// aligned in the order supplied. Items to the right of 'type' will be placed + /// to the right of the type and aligned in the order supplied. /// /// \code{.yaml} /// QualifierOrder: ['inline', 'static', 'type', 'const', 'volatile' ] @@ -2904,7 +2905,7 @@ /// Penalty for each character of whitespace indentation /// (counted relative to leading non-whitespace column). - /// \version 13 + /// \version 12 unsigned PenaltyIndentedWhitespace; /// The ``&``, ``&&`` and ``*`` alignment style. @@ -3131,7 +3132,7 @@ /// When sorting Java imports, by default static imports are placed before /// non-static imports. If ``JavaStaticImportAfterImport`` is ``After``, /// static imports are placed after non-static imports. - /// \version 13 + /// \version 12 SortJavaStaticImportOptions SortJavaStaticImport; /// If ``true``, clang-format will sort using declarations. @@ -3205,7 +3206,7 @@ }; /// Defines in which cases to put a space before or after pointer qualifiers - /// \version 13 + /// \version 12 SpaceAroundPointerQualifiersStyle SpaceAroundPointerQualifiers; /// If ``false``, spaces will be removed before assignment operators. @@ -3224,7 +3225,7 @@ /// case 1 : break; case 1: break; /// } } /// \endcode - /// \version 13 + /// \version 12 bool SpaceBeforeCaseColon; /// If ``true``, a space will be inserted before a C++11 braced list @@ -3511,7 +3512,7 @@ BFCS_After }; /// The BitFieldColonSpacingStyle to use for bitfields. - /// \version 13 + /// \version 12 BitFieldColonSpacingStyle BitFieldColonSpacing; /// Supported language standards for parsing and formatting C++ constructs. @@ -3563,7 +3564,7 @@ /// unsigned char data = 'x'; /// emit signal(data); // Now it's fine again. /// \endcode - /// \version 13 + /// \version 12 std::vector StatementAttributeLikeMacros; /// The number of columns used for tab stops.