]> granicus.if.org Git - clang/commitdiff
Fix some sphinx -Werror's
authorJonathan Roelofs <jonathan@codesourcery.com>
Mon, 20 Mar 2017 17:07:49 +0000 (17:07 +0000)
committerJonathan Roelofs <jonathan@codesourcery.com>
Mon, 20 Mar 2017 17:07:49 +0000 (17:07 +0000)
... 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

docs/ClangFormatStyleOptions.rst
docs/ReleaseNotes.rst

index d3576f97c894fdd33ab3bb1ec78399d323e7f05a..89b44aa993a3297b69d3074ef05615a021ef0d90 100644 (file)
@@ -302,7 +302,7 @@ the configuration (without a prefix: ``Auto``).
 
     .. code-block:: c++
 
-      class {
+      class Foo {
         void f() { foo(); }
       };
 
@@ -311,7 +311,7 @@ the configuration (without a prefix: ``Auto``).
 
     .. code-block:: c++
 
-      class {
+      class Foo {
         void f() { foo(); }
       };
       void f() { bar(); }
@@ -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
 
index 61a0e7ef4a35bb21cf92983c403f96acb44e4dd7..f7e31e5c98d53b05e461a64c1edc6fa039062d93 100644 (file)
@@ -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.