[clang] 684ee20 - [clang/docs] Fix various sphinx warnings/errors in docs.
Florian Hahn via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 21 09:07:04 PDT 2020
Author: Florian Hahn
Date: 2020-03-21T16:06:33Z
New Revision: 684ee2057f5d695832314c2b0d7d4c1f2d30dab5
URL: https://github.com/llvm/llvm-project/commit/684ee2057f5d695832314c2b0d7d4c1f2d30dab5
DIFF: https://github.com/llvm/llvm-project/commit/684ee2057f5d695832314c2b0d7d4c1f2d30dab5.diff
LOG: [clang/docs] Fix various sphinx warnings/errors in docs.
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
Added:
Modified:
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
Removed:
################################################################################
diff --git a/clang/docs/InternalsManual.rst b/clang/docs/InternalsManual.rst
index 4f1c8a584c67..3681675a3244 100644
--- a/clang/docs/InternalsManual.rst
+++ b/clang/docs/InternalsManual.rst
@@ -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
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 4c7af39e93e2..aee0b82880ba 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -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
diff --git a/clang/docs/OpenMPSupport.rst b/clang/docs/OpenMPSupport.rst
index ecdf73871833..209a77440537 100644
--- a/clang/docs/OpenMPSupport.rst
+++ b/clang/docs/OpenMPSupport.rst
@@ -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 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index b130cc34f685..bac1181cced1 100644
--- a/clang/docs/analyzer/checkers.rst
+++ b/clang/docs/analyzer/checkers.rst
@@ -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:
diff --git a/clang/docs/analyzer/developer-docs/DebugChecks.rst b/clang/docs/analyzer/developer-docs/DebugChecks.rst
index 05b3e2480d3b..48b584a46307 100644
--- a/clang/docs/analyzer/developer-docs/DebugChecks.rst
+++ b/clang/docs/analyzer/developer-docs/DebugChecks.rst
@@ -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::
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 60496694200e..d349b99a6d85 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -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
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 2c28789aac1d..4d930dcd0462 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -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
More information about the cfe-commits
mailing list