Summary:
reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911561
clang-format-7 -style="{BreakBeforeBraces: Stroustrup}" wasn't doing
the same as the doc
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D53520
llvm-svn: 345371
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.
/// \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.