* Option **BreakBeforeInheritanceComma** added to break before ``:`` and ``,`` in case of
multiple inheritance in a class declaration. Enabled by default in the Mozilla coding style.
- .. code-block:: c++
-
- true: false:
- class MyClass vs. class MyClass : public X, public Y {
- : public X };
- , public Y {
- };
+ +---------------------+----------------------------------------+
+ | true | false |
+ +=====================+========================================+
+ | .. code-block:: c++ | .. code-block:: c++ |
+ | | |
+ | class MyClass | class MyClass : public X, public Y { |
+ | : public X | }; |
+ | , public Y { | |
+ | }; | |
+ +---------------------+----------------------------------------+
* Align block comment decorations.
- .. code-block:: c++
-
- /* line 1 /* line 1
- * line 2 becomes: * line 2
- */ */
+ +----------------------+---------------------+
+ | Before | After |
+ +======================+=====================+
+ | .. code-block:: c++ | .. code-block:: c++ |
+ | | |
+ | /* line 1 | /* line 1 |
+ | * line 2 | * line 2 |
+ | */ | */ |
+ +----------------------+---------------------+
* The :doc:`ClangFormatStyleOptions` documentation provides detailed examples for most options.
* Namespace end comments are now added or updated automatically.
- .. code-block:: c++
-
- namespace A { namespace A {
- int i; int i;
- int j; becomes: int j;
- } } // namespace A
+ +---------------------+---------------------+
+ | Before | After |
+ +=====================+=====================+
+ | .. code-block:: c++ | .. code-block:: c++ |
+ | | |
+ | namespace A { | namespace A { |
+ | int i; | int i; |
+ | int j; | int j; |
+ | } | } |
+ +---------------------+---------------------+
* Comment reflow support added. Overly long comment lines will now be reflown with the rest of
the paragraph instead of just broken. Option **ReflowComments** added and enabled by default.