Skip to content
Snippets Groups Projects
Commit a2028619 authored by Sylvestre Ledru's avatar Sylvestre Ledru
Browse files

Refresh the clang format options doc with the recent changes

Summary:
Looks like we are out of sync between the doc and the code.


Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D37558

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312716 91177308-0d34-0410-b5e6-96231b3b80d8
parent 3463a5c9
No related branches found
No related tags found
No related merge requests found
...@@ -679,7 +679,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -679,7 +679,7 @@ the configuration (without a prefix: ``Auto``).
* ``bool IndentBraces`` Indent the wrapped braces themselves. * ``bool IndentBraces`` Indent the wrapped braces themselves.
* ``bool SplitEmptyFunctionBody`` If ``false``, empty function body can be put on a single line. * ``bool SplitEmptyFunction`` If ``false``, empty function body can be put on a single line.
This option is used only if the opening brace of the function has This option is used only if the opening brace of the function has
already been wrapped, i.e. the `AfterFunction` brace wrapping mode is already been wrapped, i.e. the `AfterFunction` brace wrapping mode is
set, and the function could/should not be put on a single line (as per set, and the function could/should not be put on a single line (as per
...@@ -691,6 +691,28 @@ the configuration (without a prefix: ``Auto``). ...@@ -691,6 +691,28 @@ the configuration (without a prefix: ``Auto``).
{} { {} {
} }
* ``bool SplitEmptyRecord`` If ``false``, empty record (e.g. class, struct or union) body
can be put on a single line. This option is used only if the opening
brace of the record has already been wrapped, i.e. the `AfterClass`
(for classes) brace wrapping mode is set.
.. code-block:: c++
class Foo vs. class Foo
{} {
}
* ``bool SplitEmptyNamespace`` If ``false``, empty namespace body can be put on a single line.
This option is used only if the opening brace of the namespace has
already been wrapped, i.e. the `AfterNamespace` brace wrapping mode is
set.
.. code-block:: c++
namespace Foo vs. namespace Foo
{} {
}
**BreakAfterJavaFieldAnnotations** (``bool``) **BreakAfterJavaFieldAnnotations** (``bool``)
Break after each annotation on a field in Java files. Break after each annotation on a field in Java files.
...@@ -1144,7 +1166,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -1144,7 +1166,7 @@ the configuration (without a prefix: ``Auto``).
IncludeCategories: IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2 Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)' - Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3 Priority: 3
- Regex: '.*' - Regex: '.*'
Priority: 1 Priority: 1
...@@ -1180,7 +1202,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -1180,7 +1202,7 @@ the configuration (without a prefix: ``Auto``).
} } } }
**IndentPPDirectives** (``PPDirectiveIndentStyle``) **IndentPPDirectives** (``PPDirectiveIndentStyle``)
Indent preprocessor directives on conditionals. The preprocessor directive indenting style to use.
Possible values: Possible values:
...@@ -1189,22 +1211,24 @@ the configuration (without a prefix: ``Auto``). ...@@ -1189,22 +1211,24 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++ .. code-block:: c++
#if FOO #if FOO
#if BAR #if BAR
#include <foo> #include <foo>
#endif #endif
#endif #endif
* ``PPDIS_AfterHash`` (in configuration: ``AfterHash``) * ``PPDIS_AfterHash`` (in configuration: ``AfterHash``)
Indents directives after the hash. Indents directives after the hash.
.. code-block:: c++ .. code-block:: c++
#if FOO #if FOO
# if BAR # if BAR
# include <foo> # include <foo>
# endif # endif
#endif #endif
**IndentWidth** (``unsigned``) **IndentWidth** (``unsigned``)
The number of columns to use for indentation. The number of columns to use for indentation.
...@@ -1318,6 +1342,10 @@ the configuration (without a prefix: ``Auto``). ...@@ -1318,6 +1342,10 @@ the configuration (without a prefix: ``Auto``).
* ``LK_TableGen`` (in configuration: ``TableGen``) * ``LK_TableGen`` (in configuration: ``TableGen``)
Should be used for TableGen code. Should be used for TableGen code.
* ``LK_TextProto`` (in configuration: ``TextProto``)
Should be used for Protocol Buffer messages in text format
(https://developers.google.com/protocol-buffers/).
**MacroBlockBegin** (``std::string``) **MacroBlockBegin** (``std::string``)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment