10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
14 #include "llvm/ADT/StringRef.h"
62 return new CheckType(Name, Context);
71 std::vector<std::unique_ptr<ClangTidyCheck>> &
Checks);
74 FactoryMap::const_iterator
begin()
const {
return Factories.begin(); }
75 FactoryMap::const_iterator
end()
const {
return Factories.end(); }
76 bool empty()
const {
return Factories.empty(); }
99 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
std::vector< std::unique_ptr< ClangTidyCheck > > Checks
void registerCheckFactory(StringRef Name, CheckFactory Factory)
Registers check Factory with name Name.
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
Contains options for clang-tidy.
Base class for all clang-tidy checks.
virtual ~ClangTidyModule()
A collection of ClangTidyCheckFactory instances.
virtual ClangTidyOptions getModuleOptions()
Gets default options for checks defined in this module.
FactoryMap::const_iterator begin() const
std::function< ClangTidyCheck *(StringRef Name, ClangTidyContext *Context)> CheckFactory
std::map< std::string, CheckFactory > FactoryMap
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
void createChecks(ClangTidyContext *Context, std::vector< std::unique_ptr< ClangTidyCheck >> &Checks)
Create instances of all checks matching CheckRegexString and store them in Checks.
virtual void addCheckFactories(ClangTidyCheckFactories &CheckFactories)=0
Implement this function in order to register all CheckFactories belonging to this module...
FactoryMap::const_iterator end() const
ClangTidyContext & Context
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.