|
clang-tools 23.0.0git
|
Implements C++ Core Guidelines Type.6. More...
#include <ProTypeMemberInitCheck.h>
Public Member Functions | |
| ProTypeMemberInitCheck (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 |
| void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
Implements C++ Core Guidelines Type.6.
Checks that every user-provided constructor value-initializes all class members and base classes that would have undefined behavior otherwise. Also check that any record types without user-provided default constructors are value-initialized where used.
Members initialized through function calls in the body of the constructor will result in false positives.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.html TODO: See if 'fixes' for false positives are optimized away by the compiler. TODO: For classes with multiple constructors, make sure that we don't offer multiple in-class initializer fixits for the same member.
Definition at line 32 of file ProTypeMemberInitCheck.h.
| clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck::ProTypeMemberInitCheck | ( | StringRef | Name, |
| ClangTidyContext * | Context ) |
Definition at line 286 of file ProTypeMemberInitCheck.cpp.
|
override |
Definition at line 337 of file ProTypeMemberInitCheck.cpp.
|
inlineoverride |
Definition at line 35 of file ProTypeMemberInitCheck.h.
|
override |
Definition at line 292 of file ProTypeMemberInitCheck.cpp.
|
override |
Definition at line 359 of file ProTypeMemberInitCheck.cpp.