[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 07:43:02 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Dan McArdle (dmcardle)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/96494.diff
1 Files Affected:
- (modified) clang/docs/ThreadSafetyAnalysis.rst (+1)
``````````diff
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 };
``````````
</details>
https://github.com/llvm/llvm-project/pull/96494
More information about the cfe-commits
mailing list