-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[clang-tidy][NFC] Fix error in example code for modernize-use-scoped-lock
's doc
#159722
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
Conversation
@llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: None (flovent) ChangesFull diff: https://github.com/llvm/llvm-project/pull/159722.diff 1 Files Affected:
diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst
index d184f1aefd806..7cf24b43d2e7b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst
@@ -51,8 +51,8 @@ Multiple ``std::lock_guard`` declarations only emit warnings:
std::mutex M1, M2;
std::lock(M1, M2);
- std::lock_guard Lock1(M, std::adopt_lock); // warning: use single 'std::scoped_lock' instead of multiple 'std::lock_guard'
- std::lock_guard Lock2(M, std::adopt_lock); // note: additional 'std::lock_guard' declared here
+ std::lock_guard Lock1(M1, std::adopt_lock); // warning: use single 'std::scoped_lock' instead of multiple 'std::lock_guard'
+ std::lock_guard Lock2(M2, std::adopt_lock); // note: additional 'std::lock_guard' declared here
Limitations
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/22861 Here is the relevant piece of the build log for the reference
|
No description provided.