From 22ceb362cdbd367ec680a2960dbc0904d7531868 Mon Sep 17 00:00:00 2001
From: Jonathan Roelofs <jonathan@codesourcery.com>
Date: Mon, 20 Mar 2017 17:07:49 +0000
Subject: [PATCH] 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
---
 docs/ClangFormatStyleOptions.rst |  6 ++--
 docs/ReleaseNotes.rst            | 47 ++++++++++++++++++++------------
 2 files changed, 32 insertions(+), 21 deletions(-)

diff --git a/docs/ClangFormatStyleOptions.rst b/docs/ClangFormatStyleOptions.rst
index d3576f97c89..89b44aa993a 100644
--- a/docs/ClangFormatStyleOptions.rst
+++ b/docs/ClangFormatStyleOptions.rst
@@ -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
 
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 61a0e7ef4a3..f7e31e5c98d 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -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.
-- 
GitLab