[PATCH] D95725: clang-extra: fix incorrect use of std::lock_guard by adding variable name (identified by MSVC [[nodiscard]] error)
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 21:08:30 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b70c86e2007: clang-extra: fix incorrect use of std::lock_guard by adding variable nameā¦ (authored by poelmanc, committed by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95725/new/
https://reviews.llvm.org/D95725
Files:
clang-tools-extra/clangd/support/Function.h
Index: clang-tools-extra/clangd/support/Function.h
===================================================================
--- clang-tools-extra/clangd/support/Function.h
+++ clang-tools-extra/clangd/support/Function.h
@@ -51,7 +51,7 @@
Subscription &operator=(Subscription &&Other) {
// If *this is active, unsubscribe.
if (Parent) {
- std::lock_guard<std::recursive_mutex>(Parent->ListenersMu);
+ std::lock_guard<std::recursive_mutex> Lock(Parent->ListenersMu);
llvm::erase_if(Parent->Listeners,
[&](const std::pair<Listener, unsigned> &P) {
return P.second == ListenerID;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95725.320669.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210202/dc2d959c/attachment.bin>
More information about the cfe-commits
mailing list