MyDeveloperDay created this revision.
MyDeveloperDay added a reviewer: HazardyKnusperkeks.
MyDeveloperDay added projects: clang, clang-format.
MyDeveloperDay requested review of this revision.
Some of the first supported version field were incorrectly attributed to a
later branch.
It wasn't possible to correctly determine the "introduced version" with my
naive implementation using git blame alone, (especially if the type had been
changed from a bool -> enum)
I saw more things attributed to clang-format 13 than I remembered and reviewed
those options to determine their introduced version.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110803
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
@@ -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<std::string> AttributeMacros;
/// If ``false``, a function call's arguments will either be all on the
@@ -1898,7 +1898,10 @@
/// Different ways to arrange const/volatile qualifiers.
/// \warning
- /// ``QualifierAlignment`` COULD lead to incorrect code generation.
+ /// Setting ``QualifierAlignment`` to something other than `Leave`, COULD
+ /// lead to incorrect code generation due to a lack of semantic information
+ /// especially in the presense of macros, care should be take to review code
+ /// changes made by this option.
/// \endwarning
/// \version 14
QualifierAlignmentStyle QualifierAlignment;
@@ -2900,7 +2903,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.
@@ -3127,7 +3130,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.
@@ -3201,7 +3204,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.
@@ -3220,7 +3223,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
@@ -3507,7 +3510,7 @@
BFCS_After
};
/// The BitFieldColonSpacingStyle to use for bitfields.
- /// \version 13
+ /// \version 12
BitFieldColonSpacingStyle BitFieldColonSpacing;
/// Supported language standards for parsing and formatting C++ constructs.
@@ -3559,7 +3562,7 @@
/// unsigned char data = 'x';
/// emit signal(data); // Now it's fine again.
/// \endcode
- /// \version 13
+ /// \version 12
std::vector<std::string> StatementAttributeLikeMacros;
/// The number of columns used for tab stops.
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ 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).
@@ -3457,7 +3457,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.
@@ -3525,7 +3525,7 @@
true: false:
template <int> void foo(); vs. template<int> 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:
@@ -3574,7 +3574,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++
@@ -3889,7 +3889,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.
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits