Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions clang/docs/ClangFormatStyleOptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4542,6 +4542,26 @@ the configuration (without a prefix: ``Auto``).
return 1; return 1;
} }

.. _IndentGotoLabelsToCurrentScope:

**IndentGotoLabelsToCurrentScope** (``Boolean``) :versionbadge:`clang-format 19` :ref:`¶ <IndentGotoLabelsToCurrentScope>`
If true, aligns labels according to the current indentation level
instead of flushing them to the left margin.


.. code-block:: c++

true: false:
int main() { int main() {
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
for (int j = 0; j < 5; j++) { for (int j = 0; j < 5; j++) {
// some code // some code
goto end_double_loop; goto end_double_loop;
} }
} }
end_double_loop: {} end_double_loop: {}
} }

.. _IndentPPDirectives:

**IndentPPDirectives** (``PPDirectiveIndentStyle``) :versionbadge:`clang-format 6` :ref:`¶ <IndentPPDirectives>`
Expand Down
Loading
Loading