clang-tools 22.0.0git
clang::tidy::misc::CoroutineHostileRAIICheck Class Reference

Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. More...

#include <CoroutineHostileRAIICheck.h>

Inheritance diagram for clang::tidy::misc::CoroutineHostileRAIICheck:
[legend]

Public Member Functions

 CoroutineHostileRAIICheck (llvm::StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Detects when objects of certain hostile RAII types persists across suspension points in a coroutine.

Such hostile types include scoped-lockable types and types belonging to a configurable denylist.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/misc/coroutine-hostile-raii.html

Definition at line 26 of file CoroutineHostileRAIICheck.h.

Constructor & Destructor Documentation

◆ CoroutineHostileRAIICheck()

clang::tidy::misc::CoroutineHostileRAIICheck::CoroutineHostileRAIICheck ( llvm::StringRef Name,
ClangTidyContext * Context )

Definition at line 70 of file CoroutineHostileRAIICheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::misc::CoroutineHostileRAIICheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 93 of file CoroutineHostileRAIICheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::misc::CoroutineHostileRAIICheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 38 of file CoroutineHostileRAIICheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::misc::CoroutineHostileRAIICheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 30 of file CoroutineHostileRAIICheck.h.

◆ registerMatchers()

void clang::tidy::misc::CoroutineHostileRAIICheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 78 of file CoroutineHostileRAIICheck.cpp.

◆ storeOptions()

void clang::tidy::misc::CoroutineHostileRAIICheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

The documentation for this class was generated from the following files: