clang-tools 22.0.0git
|
Finds uses of std::lock_guard and suggests replacing them with C++17's / alternative std::scoped_lock. More...
#include <UseScopedLockCheck.h>
Public Member Functions | |
UseScopedLockCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Finds uses of std::lock_guard and suggests replacing them with C++17's / alternative std::scoped_lock.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-scoped-lock.html
Definition at line 24 of file UseScopedLockCheck.h.
clang::tidy::modernize::UseScopedLockCheck::UseScopedLockCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 113 of file UseScopedLockCheck.cpp.
|
override |
Definition at line 177 of file UseScopedLockCheck.cpp.
References clang::tidy::modernize::findLocksInCompoundStmt(), and clang::tidy::modernize::getLockGuardsFromDecl().
|
inlineoverride |
Definition at line 33 of file UseScopedLockCheck.h.
|
inlineoverride |
Definition at line 30 of file UseScopedLockCheck.h.
|
override |
Definition at line 124 of file UseScopedLockCheck.cpp.
|
override |
Definition at line 119 of file UseScopedLockCheck.cpp.