Author: PeterChou1 Date: 2024-03-04T21:15:17+01:00 New Revision: 3b5965e633bf6f945436dc8ac33bbb37ace4acf1
URL: https://github.com/llvm/llvm-project/commit/3b5965e633bf6f945436dc8ac33bbb37ace4acf1 DIFF: https://github.com/llvm/llvm-project/commit/3b5965e633bf6f945436dc8ac33bbb37ace4acf1.diff LOG: [clang-format][doc] fix documentation for clang-format (#83415) Fixes typo in documentation for clang-format Fixes #83207. Added: Modified: clang/docs/ClangFormatStyleOptions.rst clang/docs/tools/dump_format_style.py clang/include/clang/Format/Format.h Removed: ################################################################################ diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index df399a229d8d4f..5b00a8f4c00fb8 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -318,9 +318,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - AlignConsecutiveMacros: AcrossEmptyLines + AlignConsecutiveAssignments: AcrossEmptyLines - AlignConsecutiveMacros: + AlignConsecutiveAssignments: Enabled: true AcrossEmptyLines: true AcrossComments: false @@ -460,9 +460,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - AlignConsecutiveMacros: AcrossEmptyLines + AlignConsecutiveBitFields: AcrossEmptyLines - AlignConsecutiveMacros: + AlignConsecutiveBitFields: Enabled: true AcrossEmptyLines: true AcrossComments: false @@ -602,9 +602,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - AlignConsecutiveMacros: AcrossEmptyLines + AlignConsecutiveDeclarations: AcrossEmptyLines - AlignConsecutiveMacros: + AlignConsecutiveDeclarations: Enabled: true AcrossEmptyLines: true AcrossComments: false @@ -983,9 +983,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - AlignConsecutiveMacros: AcrossEmptyLines + AlignConsecutiveTableGenCondOperatorColons: AcrossEmptyLines - AlignConsecutiveMacros: + AlignConsecutiveTableGenCondOperatorColons: Enabled: true AcrossEmptyLines: true AcrossComments: false @@ -1123,9 +1123,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - AlignConsecutiveMacros: AcrossEmptyLines + AlignConsecutiveTableGenDefinitionColons: AcrossEmptyLines - AlignConsecutiveMacros: + AlignConsecutiveTableGenDefinitionColons: Enabled: true AcrossEmptyLines: true AcrossComments: false diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index af0124b94ecaf1..af0e658fcdc55d 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -129,6 +129,7 @@ def __str__(self): s += indent( "\n\nNested configuration flags:\n\n%s\n" % self.nested_struct, 2 ) + s = s.replace("<option-name>", self.name) return s diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index 613f1fd168465d..590297fd89a398 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -154,9 +154,9 @@ struct FormatStyle { /// For example, to align across empty lines and not across comments, either /// of these work. /// \code - /// AlignConsecutiveMacros: AcrossEmptyLines + /// <option-name>: AcrossEmptyLines /// - /// AlignConsecutiveMacros: + /// <option-name>: /// Enabled: true /// AcrossEmptyLines: true /// AcrossComments: false _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits