Skip to content

Commit 94aeb8a

Browse files
committed
Update links pointing to annotations.html
Fix the links that were pointing to the old HTML version of the annotations documentation. As a minor unrelated change, also fix a link that tried (and failed) to point to the static analyzer FAQ from `UsersManual.rst`. Note that Sphinx converts link target labels like `.. _some_name:` into a HTML `id` attribute like `some-name` (i.e. underscores are converted to hyphens).
1 parent 4d558f5 commit 94aeb8a

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
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/Annotations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Running ``scan-build`` over this source produces the following output:
5959

6060
.. image:: ../images/example_attribute_nonnull.png
6161

62+
.. _custom_assertion_handlers:
63+
6264
Custom Assertion Handlers
6365
#########################
6466

@@ -164,6 +166,8 @@ the use of preprocessor macros.
164166
Mac OS X API Annotations
165167
________________________
166168

169+
.. _cocoa_mem:
170+
167171
Cocoa & Core Foundation Memory Management Annotations
168172
#####################################################
169173

clang/docs/analyzer/user-docs/FAQ.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Custom Assertions
99

1010
Q: How do I tell the analyzer that I do not want the bug being reported here since my custom error handler will safely end the execution before the bug is reached?
1111

12-
You can tell the analyzer that this path is unreachable by teaching it about your `custom assertion handlers <annotations.html#custom_assertions>`_. For example, you can modify the code segment as following:
12+
You can tell the analyzer that this path is unreachable by teaching it about your `custom assertion handlers <Annotations.html#custom-assertion-handlers>`__. For example, you can modify the code segment as following:
1313

1414
.. code-block:: c
1515
@@ -162,7 +162,7 @@ Suppressing Specific Warnings
162162

163163
Q: How can I suppress a specific analyzer warning?
164164

165-
When you encounter an analyzer bug/false positive, check if it's one of the issues discussed above or if the analyzer `annotations <annotations.html#custom_assertions>`_ can resolve the issue by helping the static analyzer understand the code better. Second, please `report it <filing_bugs.html>`_ to help us improve user experience.
165+
When you encounter an analyzer bug/false positive, check if it's one of the issues discussed above or if the analyzer `annotations <Annotations.html#custom-assertion-handlers>`__ can resolve the issue by helping the static analyzer understand the code better. Second, please `report it <FilingBugs.html>`_ to help us improve user experience.
166166

167167
Sometimes there's really no "good" way to eliminate the issue. In such cases you can "silence" it directly by annotating the problematic line of code with the help of Clang attribute 'suppress':
168168

@@ -192,6 +192,8 @@ Sometimes there's really no "good" way to eliminate the issue. In such cases you
192192
return *result; // as well as this leak path
193193
}
194194
195+
.. _exclude_code:
196+
195197
Excluding Code from Analysis
196198
----------------------------
197199

0 commit comments

Comments
 (0)