Skip to content

Conversation

flovent
Copy link
Contributor

@flovent flovent commented Sep 19, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clang-tidy

Author: None (flovent)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/159722.diff

1 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/modernize/use-scoped-lock.rst (+2-2)
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

Copy link
Contributor

@vbvictor vbvictor left a comment

Choose a reason for hiding this comment

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

LGTM

@flovent flovent enabled auto-merge (squash) September 19, 2025 08:42
@flovent flovent merged commit 143551a into llvm:main Sep 19, 2025
13 checks passed
@flovent flovent deleted the tidy-fix-doc-use-scoped-lock branch September 19, 2025 08:54
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang-tools-extra at step 5 "ninja check 1".

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
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clangd Unit Tests :: ./ClangdTests/241/332' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/unittests/./ClangdTests-Clangd Unit Tests-1114149-241-332.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=332 GTEST_SHARD_INDEX=241 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/unittests/./ClangdTests
--

Note: This is test shard 242 of 332.
[==========] Running 4 tests from 4 test suites.
[----------] Global test environment set-up.
[----------] 1 test from SignatureHelp
[ RUN      ] SignatureHelp.TemplateArguments
Built preamble of size 707616 for file /clangd-test/TestTU.cpp version null in 0.08 seconds
Built preamble of size 707616 for file /clangd-test/TestTU.cpp version null in 0.07 seconds
[       OK ] SignatureHelp.TemplateArguments (213 ms)
[----------] 1 test from SignatureHelp (213 ms total)

[----------] 1 test from FormatIncremental
[ RUN      ] FormatIncremental.FormatBrace
[       OK ] FormatIncremental.FormatBrace (2 ms)
[----------] 1 test from FormatIncremental (2 ms total)

[----------] 1 test from RenameTest
[ RUN      ] RenameTest.PrepareRename
ASTWorker building file /clangd-test/foo.h version null with command 
[/clangd-test]
clang -ffreestanding /clangd-test/foo.h
Driver produced command: cc1 -cc1 -triple aarch64-unknown-linux-gnu -fsyntax-only -disable-free -clear-ast-before-backend -main-file-name foo.h -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -ffreestanding -enable-tlsdesc -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -target-abi aapcs -debugger-tuning=gdb -fdebug-compilation-dir=/clangd-test -fcoverage-compilation-dir=/clangd-test -resource-dir lib/clang/22 -internal-isystem lib/clang/22/include -internal-isystem /usr/local/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -no-round-trip-args -target-feature -fmv -faddrsig -x c-header /clangd-test/foo.h
Building first preamble for /clangd-test/foo.h version null
Built preamble of size 730268 for file /clangd-test/foo.h version null in 0.19 seconds
indexed preamble AST for /clangd-test/foo.h version null:
  symbol slab: 0 symbols, 120 bytes
  ref slab: 0 symbols, 0 refs, 128 bytes
  relations slab: 0 relations, 24 bytes
indexed file AST for /clangd-test/foo.h version null:
  symbol slab: 1 symbols, 4448 bytes
  ref slab: 1 symbols, 1 refs, 4248 bytes
  relations slab: 0 relations, 24 bytes
Build dynamic index for main-file symbols with estimated memory usage of 11520 bytes
ASTWorker building file /clangd-test/foo.cc version null with command 
[/clangd-test]
clang -ffreestanding /clangd-test/foo.cc
Driver produced command: cc1 -cc1 -triple aarch64-unknown-linux-gnu -fsyntax-only -disable-free -clear-ast-before-backend -main-file-name foo.cc -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -ffreestanding -enable-tlsdesc -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -target-abi aapcs -debugger-tuning=gdb -fdebug-compilation-dir=/clangd-test -fcoverage-compilation-dir=/clangd-test -resource-dir lib/clang/22 -internal-isystem lib/clang/22/include -internal-isystem /usr/local/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -no-round-trip-args -target-feature -fmv -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ /clangd-test/foo.cc
Building first preamble for /clangd-test/foo.cc version null
not idle after addDocument
UNREACHABLE executed at ../llvm/clang-tools-extra/clangd/unittests/SyncAPI.cpp:22!
Built preamble of size 739968 for file /clangd-test/foo.cc version null in 9.57 seconds
indexed preamble AST for /clangd-test/foo.cc version null:
  symbol slab: 1 symbols, 4448 bytes
  ref slab: 0 symbols, 0 refs, 128 bytes
  relations slab: 0 relations, 24 bytes
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants