clang-tools 22.0.0git
clang::tidy::google::ExplicitConstructorCheck Class Reference

Checks that all single-argument constructors are explicit. More...

#include <ExplicitConstructorCheck.h>

Inheritance diagram for clang::tidy::google::ExplicitConstructorCheck:
[legend]

Public Member Functions

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

Checks that all single-argument constructors are explicit.

See https://google.github.io/styleguide/cppguide.html#Explicit_Constructors

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html

Definition at line 22 of file ExplicitConstructorCheck.h.

Constructor & Destructor Documentation

◆ ExplicitConstructorCheck()

clang::tidy::google::ExplicitConstructorCheck::ExplicitConstructorCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file ExplicitConstructorCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::google::ExplicitConstructorCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::google::ExplicitConstructorCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file ExplicitConstructorCheck.h.

◆ registerMatchers()

void clang::tidy::google::ExplicitConstructorCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 19 of file ExplicitConstructorCheck.cpp.


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