Skip to content
Snippets Groups Projects
Commit 22ceb362 authored by Jonathan Roelofs's avatar Jonathan Roelofs
Browse files

Fix some sphinx -Werror's

... 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
parent 5ab5499a
No related branches found
No related tags found
No related merge requests found
...@@ -302,7 +302,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -302,7 +302,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++ .. code-block:: c++
class { class Foo {
void f() { foo(); } void f() { foo(); }
}; };
...@@ -311,7 +311,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -311,7 +311,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++ .. code-block:: c++
class { class Foo {
void f() { foo(); } void f() { foo(); }
}; };
void f() { bar(); } void f() { bar(); }
...@@ -898,7 +898,7 @@ the configuration (without a prefix: ``Auto``). ...@@ -898,7 +898,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++ .. code-block:: c++
CommentPragmas: '^ FOOBAR pragma:' // CommentPragmas: '^ FOOBAR pragma:'
// Will leave the following line unaffected // Will leave the following line unaffected
#include <vector> // FOOBAR pragma: keep #include <vector> // FOOBAR pragma: keep
......
...@@ -135,32 +135,43 @@ clang-format ...@@ -135,32 +135,43 @@ clang-format
* Option **BreakBeforeInheritanceComma** added to break before ``:`` and ``,`` in case of * Option **BreakBeforeInheritanceComma** added to break before ``:`` and ``,`` in case of
multiple inheritance in a class declaration. Enabled by default in the Mozilla coding style. multiple inheritance in a class declaration. Enabled by default in the Mozilla coding style.
.. code-block:: c++ +---------------------+----------------------------------------+
| true | false |
true: false: +=====================+========================================+
class MyClass vs. class MyClass : public X, public Y { | .. code-block:: c++ | .. code-block:: c++ |
: public X }; | | |
, public Y { | class MyClass | class MyClass : public X, public Y { |
}; | : public X | }; |
| , public Y { | |
| }; | |
+---------------------+----------------------------------------+
* Align block comment decorations. * Align block comment decorations.
.. code-block:: c++ +----------------------+---------------------+
| Before | After |
/* line 1 /* line 1 +======================+=====================+
* line 2 becomes: * line 2 | .. code-block:: c++ | .. code-block:: c++ |
*/ */ | | |
| /* line 1 | /* line 1 |
| * line 2 | * line 2 |
| */ | */ |
+----------------------+---------------------+
* The :doc:`ClangFormatStyleOptions` documentation provides detailed examples for most options. * The :doc:`ClangFormatStyleOptions` documentation provides detailed examples for most options.
* Namespace end comments are now added or updated automatically. * Namespace end comments are now added or updated automatically.
.. code-block:: c++ +---------------------+---------------------+
| Before | After |
namespace A { namespace A { +=====================+=====================+
int i; int i; | .. code-block:: c++ | .. code-block:: c++ |
int j; becomes: int j; | | |
} } // namespace A | 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 * 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. the paragraph instead of just broken. Option **ReflowComments** added and enabled by default.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment