[clang/docs] Fix various sphinx warnings/errors in docs.
authorFlorian Hahn <flo@fhahn.com>
Sat, 21 Mar 2020 15:57:19 +0000 (15:57 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sat, 21 Mar 2020 16:06:33 +0000 (16:06 +0000)
There are a few places with unexpected indents that trip over sphinx and
other syntax errors.

Also, the C++ syntax highlighting does not work for
    class [[gsl::Owner(int)]] IntOwner {

Use a regular code:: block instead.

There are a few other warnings errors remaining, of the form
'Duplicate explicit target name: "cmdoption-clang--prefix"'. They seem
to be caused by the following
  .. option:: -B<dir>, --prefix <arg>, --prefix=<arg>

I am no Restructured Text expert, but it seems like sphinx 1.8.5
tries to generate the same target for the --prefix <arg> and
--prefix=<arg>. This pops up in a lot of places and I am not sure how to
best resolve it

Reviewers: jfb, Bigcheese, dexonsmith, rjmccall

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D76534

clang/docs/InternalsManual.rst
clang/docs/LanguageExtensions.rst
clang/docs/OpenMPSupport.rst
clang/docs/analyzer/checkers.rst
clang/docs/analyzer/developer-docs/DebugChecks.rst
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticGroups.td

index 4f1c8a5..3681675 100644 (file)
@@ -2296,7 +2296,7 @@ are created implicitly. The following spellings are accepted:
                 placement.
   ``CXX11``     Spelled with a C++-style ``[[attr]]`` syntax with an optional
                 vendor-specific namespace.
-  ``C2x``       Spelled with a C-style ``[[attr]]` syntax with an optional
+  ``C2x``       Spelled with a C-style ``[[attr]]`` syntax with an optional
                 vendor-specific namespace.
   ``Declspec``  Spelled with a Microsoft-style ``__declspec(attr)`` syntax.
   ``Keyword``   The attribute is spelled as a keyword, and required custom
index 4c7af39..aee0b82 100644 (file)
@@ -1259,7 +1259,7 @@ ASM Goto with Output Constraints
 ================================
 
 In addition to the functionality provided by `GCC's extended
-assembly`<https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html>`_, clang
+assembly <https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html>`_, clang
 supports output constraints with the `goto` form.
 
 The goto form of GCC's extended assembly allows the programmer to branch to a C
index ecdf738..209a774 100644 (file)
@@ -179,9 +179,9 @@ implementation.
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
 | device extension             | clause: device_type                                          | :good:`done`             |                                                                       |
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension             | clause: extended device                                      | :good:`done`             |                                                                    |
+| device extension             | clause: extended device                                      | :good:`done`             |                                                                       |
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension             | clause: uses_allocators clause                               | :none:`claimed`          |                                                                    |
+| device extension             | clause: uses_allocators clause                               | :none:`claimed`          |                                                                       |
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
 | device extension             | clause: in_reduction                                         | :part:`worked on`        | r308768                                                               |
 +------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
index b130cc3..bac1181 100644 (file)
@@ -1934,14 +1934,14 @@ alpha.security
 alpha.security.cert
 ^^^^^^^^^^^^^^^^^^^
 
-SEI CERT checkers which tries to find errors based on their `C coding rules<https://wiki.sei.cmu.edu/confluence/display/c/2+Rules>`_.
+SEI CERT checkers which tries to find errors based on their `C coding rules <https://wiki.sei.cmu.edu/confluence/display/c/2+Rules>`_.
 
 .. _alpha-security-cert-pos-checkers:
 
 alpha.security.cert.pos
 ^^^^^^^^^^^^^^^^^^^^^^^
 
-SEI CERT checkers of POSIX `C coding rules<https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152405>`_.
+SEI CERT checkers of `POSIX C coding rules <https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152405>`_.
 
 .. _alpha-security-cert-pos-34c:
 
index 05b3e24..48b584a 100644 (file)
@@ -281,7 +281,7 @@ ExprInspection checks
   This is useful in tests, where we don't want to issue warning for all tainted
   expressions but only check for certain expressions.
   This would help to reduce the *noise* that the `TaintTest` debug checker would
-  introduce and let you focus on the `expected-warning`s that you really care
+  introduce and let you focus on the `expected-warning`'s that you really care
   about.
 
   Example usage::
index 6049669..d349b99 100644 (file)
@@ -3373,8 +3373,8 @@ def OMPDeclareVariantDocs : Documentation {
   let Heading = "#pragma omp declare variant";
   let Content = [{
 The `declare variant` directive declares a specialized variant of a base
- function and specifies the context in which that specialized variant is used.
- The declare variant directive is a declarative directive.
+function and specifies the context in which that specialized variant is used.
+The declare variant directive is a declarative directive.
 The syntax of the `declare variant` construct is as follows:
 
   .. code-block:: none
@@ -3391,7 +3391,7 @@ where clause is one of the following:
     match(context-selector-specification)
 
 and where `variant-func-id` is the name of a function variant that is either a
- base language identifier or, for C++, a template-id.
+base language identifier or, for C++, a template-id.
 
   }];
 }
@@ -4076,8 +4076,8 @@ ways:
   including calling the ``+initialize`` method if present.
 
 - The implicit ``_cmd`` parameter containing the method's selector is still defined.
- In order to minimize code-size costs, the implementation will not emit a reference
- to the selector if the parameter is unused within the method.
 In order to minimize code-size costs, the implementation will not emit a reference
 to the selector if the parameter is unused within the method.
 
 Symbols for direct method implementations are implicitly given hidden
 visibility, meaning that they can only be called within the same linkage unit.
@@ -4633,7 +4633,7 @@ def LifetimeOwnerDocs : Documentation {
 The attribute ``[[gsl::Owner(T)]]`` applies to structs and classes that own an
 object of type ``T``:
 
-.. code-block:: c++
+.. code::
 
   class [[gsl::Owner(int)]] IntOwner {
   private:
@@ -4659,7 +4659,7 @@ def LifetimePointerDocs : Documentation {
 The attribute ``[[gsl::Pointer(T)]]`` applies to structs and classes that behave
 like pointers to an object of type ``T``:
 
-.. code-block:: c++
+.. code::
 
   class [[gsl::Pointer(int)]] IntPointer {
   private:
@@ -4718,7 +4718,7 @@ def NoBuiltinDocs : Documentation {
   let Category = DocCatFunction;
   let Content = [{
 .. Note:: This attribute is not yet fully implemented, it is validated but has
-no effect on the generated code.
+          no effect on the generated code.
 
 The ``__attribute__((no_builtin))`` is similar to the ``-fno-builtin`` flag
 except it is specific to the body of a function. The attribute may also be
index 2c28789..4d930dc 100644 (file)
@@ -1176,7 +1176,7 @@ The warning is issued if the number of pre-processor tokens exceeds
 the token limit, which can be set in three ways:
 
 1. As a limit at a specific point in a file, using the ``clang max_tokens_here``
-  pragma:
+   pragma:
 
    .. code-block: c++
       #pragma clang max_tokens_here 1234