clang-tools 22.0.0git
clang::tidy::bugprone::CapturingThisInMemberVariableCheck Class Reference

Finds lambda captures that capture the this pointer and store it as class members without handle the copy and move constructors and the assignments. More...

#include <CapturingThisInMemberVariableCheck.h>

Inheritance diagram for clang::tidy::bugprone::CapturingThisInMemberVariableCheck:
[legend]

Public Member Functions

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

Detailed Description

Finds lambda captures that capture the this pointer and store it as class members without handle the copy and move constructors and the assignments.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/capturing-this-in-member-variable.html

Definition at line 24 of file CapturingThisInMemberVariableCheck.h.

Constructor & Destructor Documentation

◆ CapturingThisInMemberVariableCheck()

clang::tidy::bugprone::CapturingThisInMemberVariableCheck::CapturingThisInMemberVariableCheck ( StringRef Name,
ClangTidyContext * Context )

Member Function Documentation

◆ check()

void clang::tidy::bugprone::CapturingThisInMemberVariableCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 123 of file CapturingThisInMemberVariableCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::bugprone::CapturingThisInMemberVariableCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 33 of file CapturingThisInMemberVariableCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::CapturingThisInMemberVariableCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 30 of file CapturingThisInMemberVariableCheck.h.

◆ registerMatchers()

void clang::tidy::bugprone::CapturingThisInMemberVariableCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

◆ storeOptions()

void clang::tidy::bugprone::CapturingThisInMemberVariableCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

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