[clang] [Clang][Docs] Fix malformed code-block directive in MSan and TSan docs (PR #190461)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 4 06:36:45 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Praneeth Sarode (DarkPhoenix42)
<details>
<summary>Changes</summary>
The `code-block` directives in MemorySanitizer.rst and ThreadSanitizer.rst were missing a leading period (`. code-block` instead of `.. code-block`). This syntax error caused Sphinx to fail to recognize the directives, resulting in the the subsequent C code being rendered as plain text rather than a syntax-highlighted block.
The currently broken rendering on the official docs can be seen [here](https://clang.llvm.org/docs/MemorySanitizer.html#id7l) and [here](https://clang.llvm.org/docs/ThreadSanitizer.html#interaction-of-inlining-with-disabling-sanitizer-instrumentation).
Fixed the typos to ensure proper HTML rendering.
---
Full diff: https://github.com/llvm/llvm-project/pull/190461.diff
2 Files Affected:
- (modified) clang/docs/MemorySanitizer.rst (+1-1)
- (modified) clang/docs/ThreadSanitizer.rst (+1-1)
``````````diff
diff --git a/clang/docs/MemorySanitizer.rst b/clang/docs/MemorySanitizer.rst
index f69eeb40ef21e..b40846a75073c 100644
--- a/clang/docs/MemorySanitizer.rst
+++ b/clang/docs/MemorySanitizer.rst
@@ -108,7 +108,7 @@ Interaction of Inlining with Disabling Sanitizer Instrumentation
* An `always_inline` function will adopt the instrumentation status of the function it is inlined into.
* Forcibly combining `no_sanitize` and ``__attribute__((always_inline))`` is not supported, and will often lead to unexpected results. To avoid mixing these attributes, use:
-. code-block:: c
+.. code-block:: c
// Note, __has_feature test for sanitizers is deprecated, and Clang will support __SANITIZE_<sanitizer>__ similar to GCC.
#if __has_feature(memory_sanitizer) || defined(__SANITIZE_MEMORY__) || ... <other sanitizers>
diff --git a/clang/docs/ThreadSanitizer.rst b/clang/docs/ThreadSanitizer.rst
index ecbfbb6f170fa..45d902d2a7d59 100644
--- a/clang/docs/ThreadSanitizer.rst
+++ b/clang/docs/ThreadSanitizer.rst
@@ -117,7 +117,7 @@ Interaction of Inlining with Disabling Sanitizer Instrumentation
* An `always_inline` function will adopt the instrumentation status of the function it is inlined into.
* Forcibly combining `no_sanitize` and ``__attribute__((always_inline))`` is not supported, and will often lead to unexpected results. To avoid mixing these attributes, use:
-. code-block:: c
+.. code-block:: c
// Note, __has_feature test for sanitizers is deprecated, and Clang will support __SANITIZE_<sanitizer>__ similar to GCC.
#if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__) || ... <other sanitizers>
``````````
</details>
https://github.com/llvm/llvm-project/pull/190461
More information about the cfe-commits
mailing list