|
clang-tools 22.0.0git
|
A collection of ClangTidyCheckFactory instances.
More...
#include <ClangTidyModule.h>
Public Types | |
| using | CheckFactory |
| using | FactoryMap = llvm::StringMap<CheckFactory> |
Public Member Functions | |
| void | registerCheckFactory (llvm::StringRef Name, CheckFactory Factory) |
Registers check Factory with name Name. | |
| template<typename CheckType> | |
| void | registerCheck (llvm::StringRef CheckName) |
Registers the CheckType with the name Name. | |
| void | eraseCheck (llvm::StringRef CheckName) |
| std::vector< std::unique_ptr< ClangTidyCheck > > | createChecks (ClangTidyContext *Context) const |
| Create instances of checks that are enabled. | |
| std::vector< std::unique_ptr< ClangTidyCheck > > | createChecksForLanguage (ClangTidyContext *Context) const |
| Create instances of checks that are enabled for the current Language. | |
| FactoryMap::const_iterator | begin () const |
| FactoryMap::const_iterator | end () const |
| bool | empty () const |
A collection of ClangTidyCheckFactory instances.
All clang-tidy modules register their check factories with an instance of this object.
Definition at line 28 of file ClangTidyModule.h.
Definition at line 30 of file ClangTidyModule.h.
| using clang::tidy::ClangTidyCheckFactories::FactoryMap = llvm::StringMap<CheckFactory> |
Definition at line 76 of file ClangTidyModule.h.
|
inline |
Definition at line 77 of file ClangTidyModule.h.
| std::vector< std::unique_ptr< ClangTidyCheck > > clang::tidy::ClangTidyCheckFactories::createChecks | ( | ClangTidyContext * | Context | ) | const |
Create instances of checks that are enabled.
Definition at line 24 of file ClangTidyModule.cpp.
References Checks(), and clang::tidy::ClangTidyContext::isCheckEnabled().
| std::vector< std::unique_ptr< ClangTidyCheck > > clang::tidy::ClangTidyCheckFactories::createChecksForLanguage | ( | ClangTidyContext * | Context | ) | const |
Create instances of checks that are enabled for the current Language.
Definition at line 33 of file ClangTidyModule.cpp.
References Checks(), clang::tidy::ClangTidyContext::getLangOpts(), and clang::tidy::ClangTidyContext::isCheckEnabled().
Referenced by clang::clangd::ParsedAST::build().
|
inline |
Definition at line 79 of file ClangTidyModule.h.
|
inline |
Definition at line 78 of file ClangTidyModule.h.
|
inline |
Definition at line 66 of file ClangTidyModule.h.
Referenced by clang::tidy::custom::registerCustomChecks().
|
inline |
Registers the CheckType with the name Name.
This method should be used for all ClangTidyChecks that don't require constructor parameters.
For example, if have a clang-tidy check like:
you can register it with:
Definition at line 59 of file ClangTidyModule.h.
References registerCheckFactory().
| void clang::tidy::ClangTidyCheckFactories::registerCheckFactory | ( | llvm::StringRef | Name, |
| CheckFactory | Factory ) |
Registers check Factory with name Name.
For all checks that have default constructors, use registerCheck.
Definition at line 18 of file ClangTidyModule.cpp.
Referenced by registerCheck(), and clang::tidy::custom::registerCustomChecks().