{sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/dev-tools/clang-formatmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/dev-tools/clang-formatmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/dev-tools/clang-formatmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/dev-tools/clang-formatmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/dev-tools/clang-formatmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/dev-tools/clang-formatmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhtarget)}(h.. _clangformat:h]h}(h]h ]h"]h$]h&]refid clangformatuh1hhKhhhhhD/var/lib/git/docbuild/linux/Documentation/dev-tools/clang-format.rstubhsection)}(hhh](htitle)}(h clang-formath]h clang-format}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h``clang-format`` is a tool to format C/C++/... code according to a set of rules and heuristics. Like most tools, it is not perfect nor covers every single case, but it is good enough to be helpful.h](hliteral)}(h``clang-format``h]h clang-format}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh is a tool to format C/C++/... code according to a set of rules and heuristics. Like most tools, it is not perfect nor covers every single case, but it is good enough to be helpful.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h2``clang-format`` can be used for several purposes:h](h)}(h``clang-format``h]h clang-format}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh" can be used for several purposes:}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hX- Quickly reformat a block of code to the kernel style. Specially useful when moving code around and aligning/sorting. See clangformatreformat_. - Spot style mistakes, typos and possible improvements in files you maintain, patches you review, diffs, etc. See clangformatreview_. - Help you follow the coding style rules, specially useful for those new to kernel development or working at the same time in several projects with different coding styles. h]h bullet_list)}(hhh](h list_item)}(hQuickly reformat a block of code to the kernel style. Specially useful when moving code around and aligning/sorting. See clangformatreformat_. h]h)}(hQuickly reformat a block of code to the kernel style. Specially useful when moving code around and aligning/sorting. See clangformatreformat_.h](hyQuickly reformat a block of code to the kernel style. Specially useful when moving code around and aligning/sorting. See }(hjhhhNhNubh reference)}(hclangformatreformat_h]hclangformatreformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameclangformatreformathclangformatreformatuh1jhjresolvedKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hSpot style mistakes, typos and possible improvements in files you maintain, patches you review, diffs, etc. See clangformatreview_. h]h)}(hSpot style mistakes, typos and possible improvements in files you maintain, patches you review, diffs, etc. See clangformatreview_.h](hpSpot style mistakes, typos and possible improvements in files you maintain, patches you review, diffs, etc. See }(hjBhhhNhNubj)}(hclangformatreview_h]hclangformatreview}(hjJhhhNhNubah}(h]h ]h"]h$]h&]nameclangformatreviewhclangformatreviewuh1jhjBj-Kubh.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hHelp you follow the coding style rules, specially useful for those new to kernel development or working at the same time in several projects with different coding styles. h]h)}(hHelp you follow the coding style rules, specially useful for those new to kernel development or working at the same time in several projects with different coding styles.h]hHelp you follow the coding style rules, specially useful for those new to kernel development or working at the same time in several projects with different coding styles.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1jhhhK hhhhubh)}(hXIts configuration file is ``.clang-format`` in the root of the kernel tree. The rules contained there try to approximate the most common kernel coding style. They also try to follow :ref:`Documentation/process/coding-style.rst ` as much as possible. Since not all the kernel follows the same style, it is possible that you may want to tweak the defaults for a particular subsystem or folder. To do so, you can override the defaults by writing another ``.clang-format`` file in a subfolder.h](hIts configuration file is }(hjhhhNhNubh)}(h``.clang-format``h]h .clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh in the root of the kernel tree. The rules contained there try to approximate the most common kernel coding style. They also try to follow }(hjhhhNhNubh)}(h;:ref:`Documentation/process/coding-style.rst `h]hinline)}(hjh]h&Documentation/process/coding-style.rst}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdev-tools/clang-format refdomainjreftyperef refexplicitrefwarn reftarget codingstyleuh1hhhhKhjubh as much as possible. Since not all the kernel follows the same style, it is possible that you may want to tweak the defaults for a particular subsystem or folder. To do so, you can override the defaults by writing another }(hjhhhNhNubh)}(h``.clang-format``h]h .clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh file in a subfolder.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe tool itself has already been included in the repositories of popular Linux distributions for a long time. Search for ``clang-format`` in your repositories. Otherwise, you can either download pre-built LLVM/clang binaries or build the source code from:h](hyThe tool itself has already been included in the repositories of popular Linux distributions for a long time. Search for }(hjhhhNhNubh)}(h``clang-format``h]h clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhv in your repositories. Otherwise, you can either download pre-built LLVM/clang binaries or build the source code from:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(h(https://releases.llvm.org/download.html h]h)}(h'https://releases.llvm.org/download.htmlh]j)}(hjh]h'https://releases.llvm.org/download.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK#hj ubah}(h]h ]h"]h$]h&]uh1jhhhK#hhhhubh)}(h'See more information about the tool at:h]h'See more information about the tool at:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubj)}(hhhttps://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html h](h)}(h,https://clang.llvm.org/docs/ClangFormat.htmlh]j)}(hjBh]h,https://clang.llvm.org/docs/ClangFormat.html}(hjDhhhNhNubah}(h]h ]h"]h$]h&]refurijBuh1jhj@ubah}(h]h ]h"]h$]h&]uh1hhhhK'hj<ubh)}(h8https://clang.llvm.org/docs/ClangFormatStyleOptions.htmlh]j)}(hjZh]h8https://clang.llvm.org/docs/ClangFormatStyleOptions.html}(hj\hhhNhNubah}(h]h ]h"]h$]h&]refurijZuh1jhjXubah}(h]h ]h"]h$]h&]uh1hhhhK)hj<ubeh}(h]h ]h"]h$]h&]uh1jhhhK'hhhhubh)}(h.. _clangformatreview:h]h}(h]h ]h"]h$]h&]hjZuh1hhK,hhhhhh referencedKubh)}(hhh](h)}(h)Review files and patches for coding styleh]h)Review files and patches for coding style}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK/ubh)}(hBy running the tool in its inline mode, you can review full subsystems, folders or individual files for code style mistakes, typos or improvements.h]hBy running the tool in its inline mode, you can review full subsystems, folders or individual files for code style mistakes, typos or improvements.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh)}(h&To do so, you can run something like::h]h%To do so, you can run something like:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjhhubh literal_block)}(hJ# Make sure your working directory is clean! clang-format -i kernel/*.[ch]h]hJ# Make sure your working directory is clean! clang-format -i kernel/*.[ch]}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK6hjhhubh)}(h%And then take a look at the git diff.h]h%And then take a look at the git diff.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjhhubh)}(hCounting the lines of such a diff is also useful for improving/tweaking the style options in the configuration file; as well as testing new ``clang-format`` features/versions.h](hCounting the lines of such a diff is also useful for improving/tweaking the style options in the configuration file; as well as testing new }(hjhhhNhNubh)}(h``clang-format``h]h clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh features/versions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubh)}(h``clang-format`` also supports reading unified diffs, so you can review patches and git diffs easily. See the documentation at:h](h)}(h``clang-format``h]h clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubho also supports reading unified diffs, so you can review patches and git diffs easily. See the documentation at:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK?hjhhubj)}(hKhttps://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting h]h)}(hJhttps://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformattingh]j)}(hjh]hJhttps://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKBhj ubah}(h]h ]h"]h$]h&]uh1jhhhKBhjhhubh)}(hITo avoid ``clang-format`` formatting some portion of a file, you can do::h](h To avoid }(hj,hhhNhNubh)}(h``clang-format``h]h clang-format}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubh/ formatting some portion of a file, you can do:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjhhubj)}(huint formatted_code; // clang-format off void unformatted_code ; // clang-format on void formatted_code_again;h]huint formatted_code; // clang-format off void unformatted_code ; // clang-format on void formatted_code_again;}hjLsbah}(h]h ]h"]h$]h&]jjuh1jhhhKFhjhhubh)}(hXWhile it might be tempting to use this to keep a file always in sync with ``clang-format``, specially if you are writing new files or if you are a maintainer, please note that people might be running different ``clang-format`` versions or not have it available at all. Therefore, you should probably refrain yourself from using this in kernel sources; at least until we see if ``clang-format`` becomes commonplace.h](hJWhile it might be tempting to use this to keep a file always in sync with }(hjZhhhNhNubh)}(h``clang-format``h]h clang-format}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubhx, specially if you are writing new files or if you are a maintainer, please note that people might be running different }(hjZhhhNhNubh)}(h``clang-format``h]h clang-format}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubh versions or not have it available at all. Therefore, you should probably refrain yourself from using this in kernel sources; at least until we see if }(hjZhhhNhNubh)}(h``clang-format``h]h clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubh becomes commonplace.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhjhhubh)}(h.. _clangformatreformat:h]h}(h]h ]h"]h$]h&]hj,uh1hhKThjhhhhjKubeh}(h]()review-files-and-patches-for-coding-stylejZeh ]h"]()review files and patches for coding styleclangformatrevieweh$]h&]uh1hhhhhhhhK/expect_referenced_by_name}jjvsexpect_referenced_by_id}jZjvsjKubh)}(hhh](h)}(hReformatting blocks of codeh]hReformatting blocks of code}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKWubh)}(hXBy using an integration with your text editor, you can reformat arbitrary blocks (selections) of code with a single keystroke. This is specially useful when moving code around, for complex code that is deeply intended, for multi-line macros (and aligning their backslashes), etc.h]hXBy using an integration with your text editor, you can reformat arbitrary blocks (selections) of code with a single keystroke. This is specially useful when moving code around, for complex code that is deeply intended, for multi-line macros (and aligning their backslashes), etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjhhubh)}(hRemember that you can always tweak the changes afterwards in those cases where the tool did not do an optimal job. But as a first approximation, it can be very useful.h]hRemember that you can always tweak the changes afterwards in those cases where the tool did not do an optimal job. But as a first approximation, it can be very useful.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjhhubh)}(hThere are integrations for many popular text editors. For some of them, like vim, emacs, BBEdit and Visual Studio you can find support built-in. For instructions, read the appropriate section at:h]hThere are integrations for many popular text editors. For some of them, like vim, emacs, BBEdit and Visual Studio you can find support built-in. For instructions, read the appropriate section at:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubj)}(h-https://clang.llvm.org/docs/ClangFormat.html h]h)}(h,https://clang.llvm.org/docs/ClangFormat.htmlh]j)}(hjh]h,https://clang.llvm.org/docs/ClangFormat.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhhhKfhjhhubh)}(hFor Atom, Eclipse, Sublime Text, Visual Studio Code, XCode and other editors and IDEs you should be able to find ready-to-use plugins.h]hFor Atom, Eclipse, Sublime Text, Visual Studio Code, XCode and other editors and IDEs you should be able to find ready-to-use plugins.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjhhubh)}(h{For this use case, consider using a secondary ``.clang-format`` so that you can tweak a few options. See clangformatextra_.h](h.For this use case, consider using a secondary }(hj hhhNhNubh)}(h``.clang-format``h]h .clang-format}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh* so that you can tweak a few options. See }(hj hhhNhNubj)}(hclangformatextra_h]hclangformatextra}(hj:hhhNhNubah}(h]h ]h"]h$]h&]nameclangformatextrahclangformatextrauh1jhj j-Kubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjhhubh)}(h.. _clangformatmissing:h]h}(h]h ]h"]h$]h&]hclangformatmissinguh1hhKohjhhhhubeh}(h](reformatting-blocks-of-codej,eh ]h"](reformatting blocks of codeclangformatreformateh$]h&]uh1hhhhhhhhKWj}jfjsj}j,jsjKubh)}(hhh](h)}(hMissing supporth]hMissing support}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhKrubh)}(h``clang-format`` is missing support for some things that are common in kernel code. They are easy to remember, so if you use the tool regularly, you will quickly learn to avoid/ignore those.h](h)}(h``clang-format``h]h clang-format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|ubh is missing support for some things that are common in kernel code. They are easy to remember, so if you use the tool regularly, you will quickly learn to avoid/ignore those.}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKthjkhhubh)}(h9In particular, some very common ones you will notice are:h]h9In particular, some very common ones you will notice are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjkhhubj)}(hX- Aligned blocks of one-line ``#defines``, e.g.:: #define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7 vs.:: #define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7 - Aligned designated initializers, e.g.:: static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, }; vs.:: static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, }; h]j)}(hhh](j )}(hX1Aligned blocks of one-line ``#defines``, e.g.:: #define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7 vs.:: #define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7 h](h)}(h/Aligned blocks of one-line ``#defines``, e.g.::h](hAligned blocks of one-line }(hjhhhNhNubh)}(h ``#defines``h]h#defines}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, e.g.:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKzhjubj)}(h|#define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7h]h|#define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK|hjubh)}(hvs.::h]hvs.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hb#define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7h]hb#define TRACING_MAP_BITS_DEFAULT 11 #define TRACING_MAP_BITS_MAX 17 #define TRACING_MAP_BITS_MIN 7}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hXAligned designated initializers, e.g.:: static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, }; vs.:: static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, }; h](h)}(h'Aligned designated initializers, e.g.::h]h&Aligned designated initializers, e.g.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hX"static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, };h]hX"static const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, };}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubh)}(hvs.::h]hvs.:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hstatic const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, };h]hstatic const struct file_operations uprobe_events_ops = { .owner = THIS_MODULE, .open = probes_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, .write = probes_write, };}hj/sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]jjuh1jhhhKzhjubah}(h]h ]h"]h$]h&]uh1jhhhKzhjkhhubh)}(h.. _clangformatextra:h]h}(h]h ]h"]h$]h&]hjJuh1hhKhjkhhhhjKubeh}(h](missing-supportj_eh ]h"](missing supportclangformatmissingeh$]h&]uh1hhhhhhhhKrj}j_jUsj}j_jUsubh)}(hhh](h)}(hExtra features/optionsh]hExtra features/options}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhhhhhKubh)}(hX1Some features/style options are not enabled by default in the configuration file in order to minimize the differences between the output and the current code. In other words, to make the difference as small as possible, which makes reviewing full-file style, as well diffs and patches as easy as possible.h]hX1Some features/style options are not enabled by default in the configuration file in order to minimize the differences between the output and the current code. In other words, to make the difference as small as possible, which makes reviewing full-file style, as well diffs and patches as easy as possible.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdhhubh)}(hIn other cases (e.g. particular subsystems/folders/files), the kernel style might be different and enabling some of these options may approximate better the style there.h]hIn other cases (e.g. particular subsystems/folders/files), the kernel style might be different and enabling some of these options may approximate better the style there.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdhhubh)}(h For instance:h]h For instance:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdhhubj)}(h- Aligning assignments (``AlignConsecutiveAssignments``). - Aligning declarations (``AlignConsecutiveDeclarations``). - Reflowing text in comments (``ReflowComments``). - Sorting ``#includes`` (``SortIncludes``). h]j)}(hhh](j )}(h8Aligning assignments (``AlignConsecutiveAssignments``). h]h)}(h7Aligning assignments (``AlignConsecutiveAssignments``).h](hAligning assignments (}(hjhhhNhNubh)}(h``AlignConsecutiveAssignments``h]hAlignConsecutiveAssignments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(h:Aligning declarations (``AlignConsecutiveDeclarations``). h]h)}(h9Aligning declarations (``AlignConsecutiveDeclarations``).h](hAligning declarations (}(hjhhhNhNubh)}(h ``AlignConsecutiveDeclarations``h]hAlignConsecutiveDeclarations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(h1Reflowing text in comments (``ReflowComments``). h]h)}(h0Reflowing text in comments (``ReflowComments``).h](hReflowing text in comments (}(hjhhhNhNubh)}(h``ReflowComments``h]hReflowComments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(h*Sorting ``#includes`` (``SortIncludes``). h]h)}(h)Sorting ``#includes`` (``SortIncludes``).h](hSorting }(hj(hhhNhNubh)}(h ``#includes``h]h #includes}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubh (}(hj(hhhNhNubh)}(h``SortIncludes``h]h SortIncludes}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubh).}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjdhhubh)}(hThey are typically useful for block re-formatting, rather than full-file. You might want to create another ``.clang-format`` file and use that one from your editor/IDE instead.h](hkThey are typically useful for block re-formatting, rather than full-file. You might want to create another }(hjlhhhNhNubh)}(h``.clang-format``h]h .clang-format}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubh4 file and use that one from your editor/IDE instead.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjdhhubeh}(h](extra-features-optionsjJeh ]h"](extra features/optionsclangformatextraeh$]h&]uh1hhhhhhhhKj}jjOsj}jJjOsjKubeh}(h]( clang-formatheh ]h"]( clang-format clangformateh$]h&]uh1hhhhhhhhKj}jhsj}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(clangformatreformat]jaclangformatreview]jJaclangformatextra]j:aurefids}(h]hajZ]jvaj,]jaj_]jUajJ]jOaunameids}(jhjjjjZjjjfj,jejbj_j_j^j[jjJjju nametypes}(jjjjjfjej_j^jjuh}(hhjhjZjjjj,jjbjj_jkj[jkjJjdjjdu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h1Hyperlink target "clangformat" is not referenced.}hj9sbah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j4ubj5)}(hhh]h)}(hhh]h8Hyperlink target "clangformatmissing" is not referenced.}hjTsbah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]levelKtypejNsourcehlineKouh1j4ube transformerN include_log] decorationNhhub.