[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
Sun Jan 31 23:20:38 PST 2021
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, lgtm!
================
Comment at: clang-tools-extra/clangd/support/Function.h:54
if (Parent) {
- std::lock_guard<std::recursive_mutex>(Parent->ListenersMu);
+ std::lock_guard<std::recursive_mutex> Guard(Parent->ListenersMu);
llvm::erase_if(Parent->Listeners,
----------------
nit: we prefer `Lock` rather than `Guard` in other places. so `s/Guard/Lock/`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95725/new/
https://reviews.llvm.org/D95725
More information about the cfe-commits
mailing list