https://github.com/DarkPhoenix42 created 
https://github.com/llvm/llvm-project/pull/190461

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.

>From 8508e9be1e89e779bfd2241037f0158482d95623 Mon Sep 17 00:00:00 2001
From: Praneeth Sarode <[email protected]>
Date: Sat, 4 Apr 2026 18:46:15 +0530
Subject: [PATCH] [Clang][Docs] Fix malformed code-block directive in MSan and
 TSan docs

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 subsequent C code being rendered as unformatted, plain text rather than a 
syntax-highlighted block.

Fixed the typos to ensure proper HTML rendering.
---
 clang/docs/MemorySanitizer.rst | 2 +-
 clang/docs/ThreadSanitizer.rst | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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>

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to