This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG691774d4030d: [clang-format][NFC] Fix document of AlignTrailingComments (authored by yusuke-kadowaki, committed by HazardyKnusperkeks).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137075/new/ https://reviews.llvm.org/D137075 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 @@ -402,10 +402,11 @@ /// Alignment options struct TrailingCommentsAlignmentStyle { - /// Specifies the way to align trailing comments + /// Specifies the way to align trailing comments. TrailingCommentsAlignmentKinds Kind; - /// How many empty lines to apply alignment - /// With ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 2, + /// How many empty lines to apply alignment. + /// When both ``MaxEmptyLinesToKeep`` and ``OverEmptyLines`` are set to 2, + /// it formats like below. /// \code /// int a; // all these /// @@ -414,7 +415,9 @@ /// /// int abcdef; // aligned /// \endcode - /// And with ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 1, + /// + /// When ``MaxEmptyLinesToKeep`` is set to 2 and ``OverEmptyLines`` is set + /// to 1, it formats like below. /// \code /// int a; // these are /// Index: clang/docs/ClangFormatStyleOptions.rst =================================================================== --- clang/docs/ClangFormatStyleOptions.rst +++ clang/docs/ClangFormatStyleOptions.rst @@ -865,7 +865,7 @@ Alignment options * ``TrailingCommentsAlignmentKinds Kind`` - Specifies the way to align trailing comments + Specifies the way to align trailing comments. Possible values: @@ -903,8 +903,9 @@ int abcd; // comment - * ``unsigned OverEmptyLines`` How many empty lines to apply alignment - With ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 2, + * ``unsigned OverEmptyLines`` How many empty lines to apply alignment. + When both ``MaxEmptyLinesToKeep`` and ``OverEmptyLines`` are set to 2, + it formats like below. .. code-block:: c++ @@ -915,7 +916,8 @@ int abcdef; // aligned - And with ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 1, + When ``MaxEmptyLinesToKeep`` is set to 2 and ``OverEmptyLines`` is set + to 1, it formats like below. .. code-block:: c++
Index: clang/include/clang/Format/Format.h =================================================================== --- clang/include/clang/Format/Format.h +++ clang/include/clang/Format/Format.h @@ -402,10 +402,11 @@ /// Alignment options struct TrailingCommentsAlignmentStyle { - /// Specifies the way to align trailing comments + /// Specifies the way to align trailing comments. TrailingCommentsAlignmentKinds Kind; - /// How many empty lines to apply alignment - /// With ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 2, + /// How many empty lines to apply alignment. + /// When both ``MaxEmptyLinesToKeep`` and ``OverEmptyLines`` are set to 2, + /// it formats like below. /// \code /// int a; // all these /// @@ -414,7 +415,9 @@ /// /// int abcdef; // aligned /// \endcode - /// And with ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 1, + /// + /// When ``MaxEmptyLinesToKeep`` is set to 2 and ``OverEmptyLines`` is set + /// to 1, it formats like below. /// \code /// int a; // these are /// Index: clang/docs/ClangFormatStyleOptions.rst =================================================================== --- clang/docs/ClangFormatStyleOptions.rst +++ clang/docs/ClangFormatStyleOptions.rst @@ -865,7 +865,7 @@ Alignment options * ``TrailingCommentsAlignmentKinds Kind`` - Specifies the way to align trailing comments + Specifies the way to align trailing comments. Possible values: @@ -903,8 +903,9 @@ int abcd; // comment - * ``unsigned OverEmptyLines`` How many empty lines to apply alignment - With ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 2, + * ``unsigned OverEmptyLines`` How many empty lines to apply alignment. + When both ``MaxEmptyLinesToKeep`` and ``OverEmptyLines`` are set to 2, + it formats like below. .. code-block:: c++ @@ -915,7 +916,8 @@ int abcdef; // aligned - And with ``MaxEmptyLinesToKeep`` is 2 and ``OverEmptyLines`` is 1, + When ``MaxEmptyLinesToKeep`` is set to 2 and ``OverEmptyLines`` is set + to 1, it formats like below. .. code-block:: c++
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits