[PATCH] D61729: [docs] Fix example for Allman brace breaking style
Jan Korous via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 14:01:22 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362646: [clang-format][NFC] Fix BS_Allman style example in the header docs areā¦ (authored by jkorous, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D61729?vs=202827&id=203243#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61729/new/
https://reviews.llvm.org/D61729
Files:
cfe/trunk/docs/ClangFormatStyleOptions.rst
cfe/trunk/include/clang/Format/Format.h
Index: cfe/trunk/docs/ClangFormatStyleOptions.rst
===================================================================
--- cfe/trunk/docs/ClangFormatStyleOptions.rst
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
.. 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
Index: cfe/trunk/include/clang/Format/Format.h
===================================================================
--- cfe/trunk/include/clang/Format/Format.h
+++ cfe/trunk/include/clang/Format/Format.h
@@ -642,19 +642,28 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61729.203243.patch
Type: text/x-patch
Size: 1676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190605/2d57dece/attachment.bin>
More information about the llvm-commits
mailing list