diff options
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ClangFormatStyleOptions.rst | 37 | ||||
-rwxr-xr-x | clang/docs/tools/dump_format_style.py | 3 |
2 files changed, 32 insertions, 8 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index 0c03c776566..1b9387cd6ee 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -266,13 +266,9 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ - true: - int a; // My comment a - int b = 2; // comment b - - false: - int a; // My comment a - int b = 2; // comment about b + true: false: + int a; // My comment a vs. int a; // My comment a + int b = 2; // comment b int b = 2; // comment about b **AllowAllParametersOfDeclarationOnNextLine** (``bool``) If the function declaration doesn't fit on a line, @@ -1541,6 +1537,26 @@ the configuration (without a prefix: ``Auto``). +**RawStringFormats** (``std::vector<RawStringFormat>``) + Raw string delimiters denoting that the raw string contents are + code in a particular language and can be reformatted. + + A raw string with a matching delimiter will be reformatted assuming the + specified language based on a predefined style given by 'BasedOnStyle'. + If 'BasedOnStyle' is not found, the formatting is based on llvm style. + + To configure this in the .clang-format file, use: + + .. code-block:: yaml + + RawStringFormats: + - Delimiter: 'pb' + Language: TextProto + BasedOnStyle: llvm + - Delimiter: 'proto' + Language: TextProto + BasedOnStyle: google + **ReflowComments** (``bool``) If ``true``, clang-format will attempt to re-flow comments. @@ -1573,6 +1589,13 @@ the configuration (without a prefix: ``Auto``). false: true: using std::cout; vs. using std::cin; using std::cin; using std::cout; + The order of using declarations is defined as follows: + Split the strings by "::" and discard any initial empty strings. The last + element of each list is a non-namespace name; all others are namespace + names. Sort the lists of names lexicographically, where the sort order of + individual names is that all non-namespace names come before all namespace + names, and within those groups, names are in case-insensitive + lexicographic order. **SpaceAfterCStyleCast** (``bool``) If ``true``, a space is inserted after C style casts. diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index e2571f46448..1ca050e062b 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -177,7 +177,8 @@ def read_options(header): for option in options: if not option.type in ['bool', 'unsigned', 'int', 'std::string', 'std::vector<std::string>', - 'std::vector<IncludeCategory>']: + 'std::vector<IncludeCategory>', + 'std::vector<RawStringFormat>']: if enums.has_key(option.type): option.enum = enums[option.type] elif nested_structs.has_key(option.type): |