Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

dmcardle
Copy link
Contributor

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

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 llvm#92408
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jun 24, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-clang

Author: Dan McArdle (dmcardle)

Changes

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 --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 };

@dmcardle
Copy link
Contributor Author

@AaronBallman PTAL — looks like #95290 broke the documentation.

Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix!

@AaronBallman AaronBallman merged commit 3402620 into llvm:main Jun 24, 2024
7 of 9 checks passed
dmcardle added a commit to dmcardle/llvm-project that referenced this pull request Jul 1, 2024
AaronBallman pushed a commit that referenced this pull request Jul 1, 2024
…97293)

This PR reverts #95290 and the one-liner followup PR #96494.

I received some substantial feedback on #95290, which I plan to address
in a future PR.

I've also received feedback that because the change emits errors where
they were not emitted before, we should at least have a flag to disable
the stricter warnings.
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…lvm#97293)

This PR reverts llvm#95290 and the one-liner followup PR llvm#96494.

I received some substantial feedback on llvm#95290, which I plan to address
in a future PR.

I've also received feedback that because the change emits errors where
they were not emitted before, we should at least have a flag to disable
the stricter warnings.
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…lvm#97293)

This PR reverts llvm#95290 and the one-liner followup PR llvm#96494.

I received some substantial feedback on llvm#95290, which I plan to address
in a future PR.

I've also received feedback that because the change emits errors where
they were not emitted before, we should at least have a flag to disable
the stricter warnings.
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
…st (llvm#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 llvm#92408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants