summaryrefslogtreecommitdiffstats
path: root/clang/docs/ClangFormatStyleOptions.rst
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-05-08 15:08:00 +0000
committerDaniel Jasper <djasper@google.com>2017-05-08 15:08:00 +0000
commit7fdbb3feda32fa3af4202c01ff49a3a7f050b1a2 (patch)
tree9cac9fe1effb95b8cdf7972a10618e960107f462 /clang/docs/ClangFormatStyleOptions.rst
parent988e7e4fe8b0276ae59ba1a8022f2bca3372b2f2 (diff)
downloadbcm5719-llvm-7fdbb3feda32fa3af4202c01ff49a3a7f050b1a2.tar.gz
bcm5719-llvm-7fdbb3feda32fa3af4202c01ff49a3a7f050b1a2.zip
[clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding
DontAlign This converts the clang-format option AlignEscapedNewlinesLeft from a boolean to an enum, named AlignEscapedNewlines, with options Left (prev. true), Right (prev. false), and a new option DontAlign. When set to DontAlign, the backslashes are placed just after the last token in each line: #define EXAMPLE \ do { \ int x = aaaaa; \ int b; \ int dddddddddd; \ } while (0) Patch by jtbandes. Thank you! llvm-svn: 302428
Diffstat (limited to 'clang/docs/ClangFormatStyleOptions.rst')
-rw-r--r--clang/docs/ClangFormatStyleOptions.rst52
1 files changed, 37 insertions, 15 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index ed628e37008..f54acd9b81d 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -209,23 +209,45 @@ the configuration (without a prefix: ``Auto``).
float b = 23;
std::string ccc = 23;
-**AlignEscapedNewlinesLeft** (``bool``)
- If ``true``, aligns escaped newlines as far left as possible.
- Otherwise puts them into the right-most column.
+**AlignEscapedNewlines** (``EscapedNewlineAlignmentStyle``)
+ Options for aligning backslashes in escaped newlines.
- .. code-block:: c++
+ Possible values:
+
+ * ``ENAS_DontAlign`` (in configuration: ``DontAlign``)
+ Don't align escaped newlines.
+
+ .. code-block:: c++
+
+ #define A \
+ int aaaa; \
+ int b; \
+ int dddddddddd;
+
+ * ``ENAS_Left`` (in configuration: ``Left``)
+ Align escaped newlines as far left as possible.
+
+ .. code-block:: c++
+
+ true:
+ #define A \
+ int aaaa; \
+ int b; \
+ int dddddddddd;
+
+ false:
+
+ * ``ENAS_Right`` (in configuration: ``Right``)
+ Align escaped newlines in the right-most column.
+
+ .. code-block:: c++
+
+ #define A \
+ int aaaa; \
+ int b; \
+ int dddddddddd;
- true:
- #define A \
- int aaaa; \
- int b; \
- int dddddddddd;
- false:
- #define A \
- int aaaa; \
- int b; \
- int dddddddddd;
**AlignOperands** (``bool``)
If ``true``, horizontally align operands of binary and ternary
@@ -1525,7 +1547,7 @@ the configuration (without a prefix: ``Auto``).
Use C++03-compatible syntax.
* ``LS_Cpp11`` (in configuration: ``Cpp11``)
- Use features of C++11, C++14 and C++1z (e.g. ``A<A<int>>`` instead of
+ Use features of C++11, C++14 and C++1z (e.g. ``A<A<int>>`` instead of
``A<A<int> >``).
* ``LS_Auto`` (in configuration: ``Auto``)
OpenPOWER on IntegriCloud