clang-tools 22.0.0git
|
Finds member initializations in the constructor body which can be placed into the initialization list instead. More...
#include <PreferMemberInitializerCheck.h>
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 |
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.
clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck::PreferMemberInitializerCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 144 of file PreferMemberInitializerCheck.cpp.
|
override |
Definition at line 156 of file PreferMemberInitializerCheck.cpp.
References clang::tidy::cppcoreguidelines::canAdvanceAssignment(), clang::tidy::cppcoreguidelines::isAssignmentToMemberOf(), clang::tidy::cppcoreguidelines::isControlStatement(), clang::tidy::cppcoreguidelines::isNoReturnCallStatement(), and clang::tidy::cppcoreguidelines::updateAssignmentLevel().
|
inlineoverride |
Definition at line 24 of file PreferMemberInitializerCheck.h.
|
override |
Definition at line 148 of file PreferMemberInitializerCheck.cpp.