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