summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2018-10-22 18:48:58 +0000
committerSylvestre Ledru <sylvestre@debian.org>2018-10-22 18:48:58 +0000
commit8b39baec5077557f618a57d9b3519e4fca10c060 (patch)
treeb957159e770edadd750d1a966c7a30e7a4c5036b /docs
parent7d365ee4ba1ab5309b046e71a0825714aaeaf5ca (diff)
downloadclang-8b39baec5077557f618a57d9b3519e4fca10c060.tar.gz
Generate ClangFormatStyleOptions.rst from Format.h (using docs/tools/dump_format_style.py)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/ClangFormatStyleOptions.rst56
1 files changed, 42 insertions, 14 deletions
diff --git a/docs/ClangFormatStyleOptions.rst b/docs/ClangFormatStyleOptions.rst
index 60696b3bb9..3a43c98911 100644
--- a/docs/ClangFormatStyleOptions.rst
+++ b/docs/ClangFormatStyleOptions.rst
@@ -1134,21 +1134,17 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++
true:
- FitsOnOneLine::Constructor()
- : aaaaaaaaaaaaa(aaaaaaaaaaaaaa), aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}
-
- DoesntFit::Constructor()
- : aaaaaaaaaaaaa(aaaaaaaaaaaaaa),
- aaaaaaaaaaaaa(aaaaaaaaaaaaaa),
- aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}
+ SomeClass::Constructor()
+ : aaaaaaaa(aaaaaaaa), aaaaaaaa(aaaaaaaa), aaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa) {
+ return 0;
+ }
false:
- FitsOnOneLine::Constructor()
- : aaaaaaaaaaaaa(aaaaaaaaaaaaaa), aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}
-
- DoesntFit::Constructor()
- : aaaaaaaaaaaaa(aaaaaaaaaaaaaa), aaaaaaaaaaaaa(aaaaaaaaaaaaaa),
- aaaaaaaaaaaaa(aaaaaaaaaaaaaa) {}
+ SomeClass::Constructor()
+ : aaaaaaaa(aaaaaaaa), aaaaaaaa(aaaaaaaa),
+ aaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa) {
+ return 0;
+ }
**ConstructorInitializerIndentWidth** (``unsigned``)
The number of characters to use for indentation of constructor
@@ -1402,6 +1398,37 @@ the configuration (without a prefix: ``Auto``).
LoooooooooooooooooooooooooooooooooooooooongReturnType
LoooooooooooooooooooooooooooooooongFunctionDeclaration();
+**JavaImportGroups** (``std::vector<std::string>``)
+ A vector of prefixes ordered by the desired groups for Java imports.
+
+ Each group is seperated by a newline. Static imports will also follow the
+ same grouping convention above all non-static imports. One group's prefix
+ can be a subset of another - the longest prefix is always matched. Within
+ a group, the imports are ordered lexicographically.
+
+ In the .clang-format configuration file, this can be configured like:
+
+ .. code-block:: yaml
+
+ JavaImportGroups: ['com.example', 'com', 'org']
+ Which will result in imports being formatted as so:
+
+ .. code-block:: java
+
+ import static com.example.function1;
+
+ import static com.test.function2;
+
+ import static org.example.function3;
+
+ import com.example.ClassA;
+ import com.example.Test;
+ import com.example.a.ClassB;
+
+ import com.test.ClassC;
+
+ import org.example.ClassD;
+
**JavaScriptQuotes** (``JavaScriptQuoteStyle``)
The JavaScriptQuoteStyle to use for JavaScript strings.
@@ -1980,7 +2007,8 @@ the configuration (without a prefix: ``Auto``).
**StatementMacros** (``std::vector<std::string>``)
- A vector of macros that should be interpreted as complete statements.
+ A vector of macros that should be interpreted as complete
+ statements.
Typical macros are expressions, and require a semi-colon to be
added; sometimes this is not the case, and this allows to make