Skip to content

Commit 21e58ee

Browse files
authored
[NFC][analyzer][docs] Migrate 'annotations.html' to RST (#122246)
This commit migrates the contents of 'annotations.html' in the old HTML-based documentation of the Clang static analyzer to the new RST-based documentation. During this conversion I reordered the sections of this documentation file by placing the section "Custom Assertion Handlers" as a subsection of "Annotations to Enhance Generic Checks". (The primary motivation was that Sphinx complained about inconsistent section levels; with this change I preserved that sections describing individual annotations are all on the same level.) Apart from this change and the format conversion, I didn't review, validate or edit the contents of this documentation file because I think it would be better to place any additional changes in separate commits.
1 parent 3397950 commit 21e58ee

File tree

10 files changed

+708
-770
lines changed

10 files changed

+708
-770
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,8 +2137,8 @@ method; it specifies that the method expects its ``self`` parameter to have a
21372137
- (void) bar __attribute__((ns_consumes_self));
21382138
- (void) baz:(id) __attribute__((ns_consumed)) x;
21392139
2140-
Further examples of these attributes are available in the static analyzer's `list of annotations for analysis
2141-
<https://clang-analyzer.llvm.org/annotations.html#cocoa_mem>`_.
2140+
Further examples of these attributes are available in the static analyzer's
2141+
`list of annotations for analysis <analyzer/user-docs/Annotations.html#cocoa-mem>`__.
21422142
21432143
Query for these features with ``__has_attribute(ns_consumed)``,
21442144
``__has_attribute(ns_returns_retained)``, etc.
@@ -4792,8 +4792,8 @@ Extensions for Static Analysis
47924792
Clang supports additional attributes that are useful for documenting program
47934793
invariants and rules for static analysis tools, such as the `Clang Static
47944794
Analyzer <https://clang-analyzer.llvm.org/>`_. These attributes are documented
4795-
in the analyzer's `list of source-level annotations
4796-
<https://clang-analyzer.llvm.org/annotations.html>`_.
4795+
in the analyzer's `list of annotations for analysis
4796+
<analyzer/user-docs/Annotations.html>`__.
47974797
47984798
47994799
Extensions for Dynamic Analysis

clang/docs/UsersManual.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,8 @@ Controlling Static Analyzer Diagnostics
13641364
While not strictly part of the compiler, the diagnostics from Clang's
13651365
`static analyzer <https://clang-analyzer.llvm.org>`_ can also be
13661366
influenced by the user via changes to the source code. See the available
1367-
`annotations <https://clang-analyzer.llvm.org/annotations.html>`_ and the
1368-
analyzer's `FAQ
1369-
page <https://clang-analyzer.llvm.org/faq.html#exclude_code>`_ for more
1370-
information.
1367+
`annotations <analyzer/user-docs/Annotations.html>`_ and the analyzer's
1368+
`FAQ page <analyzer/user-docs/FAQ.html#exclude-code>`_ for more information.
13711369

13721370
.. _usersmanual-precompiled-headers:
13731371

clang/docs/analyzer/user-docs.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ Contents:
1212
user-docs/FilingBugs
1313
user-docs/CrossTranslationUnit
1414
user-docs/TaintAnalysisConfiguration
15+
user-docs/Annotations
1516
user-docs/FAQ

0 commit comments

Comments
 (0)