clang-tools 22.0.0git
clang::tidy::performance::MoveConstructorInitCheck Class Reference

The check flags user-defined move constructors that have a ctor-initializer initializing a member or base class through a copy constructor instead of a move constructor. More...

#include <MoveConstructorInitCheck.h>

Inheritance diagram for clang::tidy::performance::MoveConstructorInitCheck:
[legend]

Public Member Functions

 MoveConstructorInitCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

The check flags user-defined move constructors that have a ctor-initializer initializing a member or base class through a copy constructor instead of a move constructor.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/move-constructor-init.html

Definition at line 21 of file MoveConstructorInitCheck.h.

Constructor & Destructor Documentation

◆ MoveConstructorInitCheck()

clang::tidy::performance::MoveConstructorInitCheck::MoveConstructorInitCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 17 of file MoveConstructorInitCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::performance::MoveConstructorInitCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 35 of file MoveConstructorInitCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::performance::MoveConstructorInitCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 24 of file MoveConstructorInitCheck.h.

◆ registerMatchers()

void clang::tidy::performance::MoveConstructorInitCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 21 of file MoveConstructorInitCheck.cpp.


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