We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
modernize-use-scoped-lock
1 parent a2dcc88 commit 143551aCopy full SHA for 143551a
clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst
@@ -51,8 +51,8 @@ Multiple ``std::lock_guard`` declarations only emit warnings:
51
52
std::mutex M1, M2;
53
std::lock(M1, M2);
54
- std::lock_guard Lock1(M, std::adopt_lock); // warning: use single 'std::scoped_lock' instead of multiple 'std::lock_guard'
55
- 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
56
57
58
Limitations
0 commit comments