clang-tools 22.0.0git
clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck Class Reference

Finds member initializations in the constructor body which can be placed into the initialization list instead. More...

#include <PreferMemberInitializerCheck.h>

Inheritance diagram for clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck:
[legend]

Public Member Functions

 PreferMemberInitializerCheck (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

Finds member initializations in the constructor body which can be placed into the initialization list instead.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.html

Definition at line 21 of file PreferMemberInitializerCheck.h.

Constructor & Destructor Documentation

◆ PreferMemberInitializerCheck()

clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck::PreferMemberInitializerCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 144 of file PreferMemberInitializerCheck.cpp.

Member Function Documentation

◆ check()

◆ isLanguageVersionSupported()

bool clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 24 of file PreferMemberInitializerCheck.h.

◆ registerMatchers()

void clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 148 of file PreferMemberInitializerCheck.cpp.


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