summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/docs/ClangFormatStyleOptions.rst15
-rw-r--r--clang/include/clang/Format/Format.h15
2 files changed, 12 insertions, 18 deletions
diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index d50c883dbd9..6b7c578317b 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -908,20 +908,17 @@ the configuration (without a prefix: ``Auto``).
try {
foo();
- } catch () {
+ }
+ catch () {
}
void foo() { bar(); }
- class foo
- {
+ class foo {
};
if (foo()) {
- } else {
}
- enum X : int
- {
- A,
- B
- };
+ else {
+ }
+ enum X : int { A, B };
* ``BS_Allman`` (in configuration: ``Allman``)
Always break before braces.
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index b777496eb19..cb37b0c890c 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -533,20 +533,17 @@ struct FormatStyle {
/// \code
/// try {
/// foo();
- /// } catch () {
+ /// }
+ /// catch () {
/// }
/// void foo() { bar(); }
- /// class foo
- /// {
+ /// class foo {
/// };
/// if (foo()) {
- /// } else {
/// }
- /// enum X : int
- /// {
- /// A,
- /// B
- /// };
+ /// else {
+ /// }
+ /// enum X : int { A, B };
/// \endcode
BS_Stroustrup,
/// Always break before braces.
OpenPOWER on IntegriCloud