This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8385ee05e59d: [clang-format] NFC Document the other space before colon option (authored by sstwcw).
Changed prior to commit: https://reviews.llvm.org/D147422?vs=510391&id=511681#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147422/new/ https://reviews.llvm.org/D147422 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 @@ -3749,7 +3749,8 @@ /// \version 7 bool SpaceBeforeInheritanceColon; - /// If ``true``, a space will be add before a JSON colon. + /// If ``true``, a space will be added before a JSON colon. For other + /// languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead. /// \code /// true: false: /// { { @@ -4032,8 +4033,9 @@ /// \version 10 bool SpacesInConditionalStatement; - /// If ``true``, spaces are inserted inside container literals (e.g. - /// ObjC and Javascript array and dict literals). + /// If ``true``, spaces are inserted inside container literals (e.g. ObjC and + /// Javascript array and dict literals). For JSON, use + /// ``SpaceBeforeJsonColon`` instead. /// \code{.js} /// true: false: /// var arr = [ 1, 2, 3 ]; vs. var arr = [1, 2, 3]; Index: clang/docs/ClangFormatStyleOptions.rst =================================================================== --- clang/docs/ClangFormatStyleOptions.rst +++ clang/docs/ClangFormatStyleOptions.rst @@ -4782,7 +4782,8 @@ .. _SpaceBeforeJsonColon: **SpaceBeforeJsonColon** (``Boolean``) :versionbadge:`clang-format 17` :ref:`¶ <SpaceBeforeJsonColon>` - If ``true``, a space will be add before a JSON colon. + If ``true``, a space will be added before a JSON colon. For other + languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead. .. code-block:: c++ @@ -5100,8 +5101,9 @@ .. _SpacesInContainerLiterals: **SpacesInContainerLiterals** (``Boolean``) :versionbadge:`clang-format 3.7` :ref:`¶ <SpacesInContainerLiterals>` - If ``true``, spaces are inserted inside container literals (e.g. - ObjC and Javascript array and dict literals). + If ``true``, spaces are inserted inside container literals (e.g. ObjC and + Javascript array and dict literals). For JSON, use + ``SpaceBeforeJsonColon`` instead. .. code-block:: js
Index: clang/include/clang/Format/Format.h =================================================================== --- clang/include/clang/Format/Format.h +++ clang/include/clang/Format/Format.h @@ -3749,7 +3749,8 @@ /// \version 7 bool SpaceBeforeInheritanceColon; - /// If ``true``, a space will be add before a JSON colon. + /// If ``true``, a space will be added before a JSON colon. For other + /// languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead. /// \code /// true: false: /// { { @@ -4032,8 +4033,9 @@ /// \version 10 bool SpacesInConditionalStatement; - /// If ``true``, spaces are inserted inside container literals (e.g. - /// ObjC and Javascript array and dict literals). + /// If ``true``, spaces are inserted inside container literals (e.g. ObjC and + /// Javascript array and dict literals). For JSON, use + /// ``SpaceBeforeJsonColon`` instead. /// \code{.js} /// true: false: /// var arr = [ 1, 2, 3 ]; vs. var arr = [1, 2, 3]; Index: clang/docs/ClangFormatStyleOptions.rst =================================================================== --- clang/docs/ClangFormatStyleOptions.rst +++ clang/docs/ClangFormatStyleOptions.rst @@ -4782,7 +4782,8 @@ .. _SpaceBeforeJsonColon: **SpaceBeforeJsonColon** (``Boolean``) :versionbadge:`clang-format 17` :ref:`¶ <SpaceBeforeJsonColon>` - If ``true``, a space will be add before a JSON colon. + If ``true``, a space will be added before a JSON colon. For other + languages, e.g. JavaScript, use ``SpacesInContainerLiterals`` instead. .. code-block:: c++ @@ -5100,8 +5101,9 @@ .. _SpacesInContainerLiterals: **SpacesInContainerLiterals** (``Boolean``) :versionbadge:`clang-format 3.7` :ref:`¶ <SpacesInContainerLiterals>` - If ``true``, spaces are inserted inside container literals (e.g. - ObjC and Javascript array and dict literals). + If ``true``, spaces are inserted inside container literals (e.g. ObjC and + Javascript array and dict literals). For JSON, use + ``SpaceBeforeJsonColon`` instead. .. code-block:: js
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits