Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Fix some sphinx -Werror's
Browse files Browse the repository at this point in the history
... mostly having to do with code blocks which the syntax highlighter chokes on


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298275 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jroelofs committed Mar 20, 2017
1 parent 5ab5499 commit 22ceb36
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
6 changes: 3 additions & 3 deletions docs/ClangFormatStyleOptions.rst
Expand Up @@ -302,7 +302,7 @@ the configuration (without a prefix: ``Auto``).

.. code-block:: c++

class {
class Foo {
void f() { foo(); }
};

Expand All @@ -311,7 +311,7 @@ the configuration (without a prefix: ``Auto``).

.. code-block:: c++

class {
class Foo {
void f() { foo(); }
};
void f() { bar(); }
Expand Down Expand Up @@ -898,7 +898,7 @@ the configuration (without a prefix: ``Auto``).

.. code-block:: c++

CommentPragmas: '^ FOOBAR pragma:'
// CommentPragmas: '^ FOOBAR pragma:'
// Will leave the following line unaffected
#include <vector> // FOOBAR pragma: keep

Expand Down
47 changes: 29 additions & 18 deletions docs/ReleaseNotes.rst
Expand Up @@ -135,32 +135,43 @@ clang-format
* 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.
Expand Down

0 comments on commit 22ceb36

Please sign in to comment.