Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorsstwcw <f0gukp2nk@protonmail.com>2022-03-14 04:24:31 +0300
committersstwcw <f0gukp2nk@protonmail.com>2022-03-14 07:41:40 +0300
commit93b5505b456f75ff33be20402b0317cbb2131a66 (patch)
treee00a9df368bcc6b46b02d111e20af990c15f88fb /clang
parent65a3712af66fb0abfdce96a1f86ae5bad9a48b1c (diff)
[clang-format] Extract doc for entire configuration structs
Previously the comments for configuration structs as a whole like `BraceWrappingFlags` did not go into the doc. Reviewed By: curdeius Differential Revision: https://reviews.llvm.org/D120361
Diffstat (limited to 'clang')
-rw-r--r--clang/docs/ClangFormatStyleOptions.rst18
-rwxr-xr-xclang/docs/tools/dump_format_style.py2
2 files changed, 19 insertions, 1 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index 9b5d9ee7ef29..c1af14466dd0 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1212,6 +1212,14 @@ the configuration (without a prefix: ``Auto``).
Nested configuration flags:
+ Precise control over the wrapping of braces.
+
+ .. code-block:: c++
+
+ # Should be declared this way:
+ BreakBeforeBraces: Custom
+ BraceWrapping:
+ AfterClass: true
* ``bool AfterCaseLabel`` Wrap case labels.
@@ -3992,6 +4000,15 @@ the configuration (without a prefix: ``Auto``).
Nested configuration flags:
+ Precise control over the spacing before parentheses.
+
+ .. code-block:: c++
+
+ # Should be declared this way:
+ SpaceBeforeParens: Custom
+ SpaceBeforeParensOptions:
+ AfterControlStatements: true
+ AfterFunctionDefinitionName: true
* ``bool AfterControlStatements`` If ``true``, put space betwee control statement keywords
(for/if/while...) and opening parentheses.
@@ -4221,6 +4238,7 @@ the configuration (without a prefix: ``Auto``).
Nested configuration flags:
+ Control of spaces within a single line comment
* ``unsigned Minimum`` The minimum number of spaces at the start of the comment.
diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py
index d04920987ec6..fb074435e753 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/docs/tools/dump_format_style.py
@@ -118,7 +118,7 @@ class NestedStruct(object):
self.values = []
def __str__(self):
- return '\n'.join(map(str, self.values))
+ return self.comment + '\n' + '\n'.join(map(str, self.values))
class NestedField(object):
def __init__(self, name, comment):