[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

Dan McArdle via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 07:42:27 PDT 2024


https://github.com/dmcardle created https://github.com/llvm/llvm-project/pull/96494

Without a newline, documentation was failing to build with this error:

    Warning, treated as error:
    /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/ThreadSafetyAnalysis.rst:466:Error in "code-block" directive:
    maximum 1 argument(s) allowed, 10 supplied.

Issue #92408

>From 3bd8ad70da4c3ab7a89969dd31b728dcf301d7ab Mon Sep 17 00:00:00 2001
From: Dan McArdle <dmcardle at google.com>
Date: Mon, 24 Jun 2024 10:39:58 -0400
Subject: [PATCH] [clang][ThreadSafety] Fix code block syntax in
 ThreadSafetyAnalysis.rst

Without a newline, documentation was failing to build with this error:

    Warning, treated as error:
    /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/ThreadSafetyAnalysis.rst:466:Error in "code-block" directive:
    maximum 1 argument(s) allowed, 10 supplied.

Issue #92408
---
 clang/docs/ThreadSafetyAnalysis.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/docs/ThreadSafetyAnalysis.rst b/clang/docs/ThreadSafetyAnalysis.rst
index 0ecbebe7a692f..1513719caa464 100644
--- a/clang/docs/ThreadSafetyAnalysis.rst
+++ b/clang/docs/ThreadSafetyAnalysis.rst
@@ -464,6 +464,7 @@ on success and ``LockNotAcquired`` on failure, the analysis may fail to detect
 access to guarded data without holding the mutex because they are both non-zero.
 
 .. code-block:: c++
+
   // *** Beware: this code demonstrates incorrect usage. ***
 
   enum TrylockResult { LockAcquired = 1, LockNotAcquired = 2 };



More information about the cfe-commits mailing list