9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H 13 #include "llvm/ADT/StringRef.h" 29 using CheckFactory = std::function<std::unique_ptr<ClangTidyCheck>(
61 return std::make_unique<CheckType>(
Name, Context);
66 std::vector<std::unique_ptr<ClangTidyCheck>>
70 FactoryMap::const_iterator
begin()
const {
return Factories.begin(); }
71 FactoryMap::const_iterator
end()
const {
return Factories.end(); }
72 bool empty()
const {
return Factories.empty(); }
95 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
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.
virtual ~ClangTidyModule()
A collection of ClangTidyCheckFactory instances.
FactoryMap::const_iterator begin() const
std::map< std::string, CheckFactory > FactoryMap
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
std::function< std::unique_ptr< ClangTidyCheck >(StringRef Name, ClangTidyContext *Context)> CheckFactory
static constexpr llvm::StringLiteral Name
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
FactoryMap::const_iterator end() const
std::vector< std::unique_ptr< ClangTidyCheck > > createChecks(ClangTidyContext *Context)
Create instances of checks that are enabled.