clang-tools 22.0.0git
clang::tidy::readability::RedundantMemberInitCheck Class Reference

Finds member initializations that are unnecessary because the same default constructor would be called if they were not present. More...

#include <RedundantMemberInitCheck.h>

Inheritance diagram for clang::tidy::readability::RedundantMemberInitCheck:
[legend]

Public Member Functions

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

Detailed Description

Finds member initializations that are unnecessary because the same default constructor would be called if they were not present.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Definition at line 21 of file RedundantMemberInitCheck.h.

Constructor & Destructor Documentation

◆ RedundantMemberInitCheck()

clang::tidy::readability::RedundantMemberInitCheck::RedundantMemberInitCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file RedundantMemberInitCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::readability::RedundantMemberInitCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::readability::RedundantMemberInitCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 33 of file RedundantMemberInitCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::readability::RedundantMemberInitCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file RedundantMemberInitCheck.h.

◆ registerMatchers()

void clang::tidy::readability::RedundantMemberInitCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 41 of file RedundantMemberInitCheck.cpp.

◆ storeOptions()

void clang::tidy::readability::RedundantMemberInitCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 36 of file RedundantMemberInitCheck.cpp.


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