summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Korous <jkorous@apple.com>2019-06-05 20:59:48 +0000
committerJan Korous <jkorous@apple.com>2019-06-05 20:59:48 +0000
commita3701caad826a6da3915a1b485cbe0a333e6a484 (patch)
tree163031f5a0ea8608e8af987755d2ebc2497cf506
parentba86f2a22e7a95020e924baf9203ccfd10df5162 (diff)
downloadbcm5719-llvm-a3701caad826a6da3915a1b485cbe0a333e6a484.tar.gz
bcm5719-llvm-a3701caad826a6da3915a1b485cbe0a333e6a484.zip
[clang-format][NFC] Fix BS_Allman style example in the header docs are generated from
Differential Revision: https://reviews.llvm.org/D61729 llvm-svn: 362646
-rw-r--r--clang/docs/ClangFormatStyleOptions.rst21
-rw-r--r--clang/include/clang/Format/Format.h21
2 files changed, 30 insertions, 12 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index 342ecc7914a..8bd0e9c8f7e 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++
- try {
+ try
+ {
foo();
}
- catch () {
+ catch ()
+ {
}
void foo() { bar(); }
- class foo {
+ class foo
+ {
};
- if (foo()) {
+ if (foo())
+ {
}
- else {
+ else
+ {
}
- enum X : int { A, B };
+ enum X : int
+ {
+ A,
+ B
+ };
* ``BS_GNU`` (in configuration: ``GNU``)
Always break before braces and add an extra level of indentation to
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index af7c351d79b..0aae75276fa 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -642,19 +642,28 @@ struct FormatStyle {
BS_Stroustrup,
/// Always break before braces.
/// \code
- /// try {
+ /// try
+ /// {
/// foo();
/// }
- /// catch () {
+ /// catch ()
+ /// {
/// }
/// void foo() { bar(); }
- /// class foo {
+ /// class foo
+ /// {
/// };
- /// if (foo()) {
+ /// if (foo())
+ /// {
/// }
- /// else {
+ /// else
+ /// {
/// }
- /// enum X : int { A, B };
+ /// enum X : int
+ /// {
+ /// A,
+ /// B
+ /// };
/// \endcode
BS_Allman,
/// Always break before braces and add an extra level of indentation to
OpenPOWER on IntegriCloud