10 #ifndef LLVM_CLANG_STATICANALYZER_CORE_CHECKERREGISTRY_H 11 #define LLVM_CLANG_STATICANALYZER_CORE_CHECKERREGISTRY_H 15 #include "llvm/ADT/StringMap.h" 16 #include "llvm/ADT/StringRef.h" 60 #ifndef CLANG_ANALYZER_API_VERSION_STRING 66 #define CLANG_ANALYZER_API_VERSION_STRING CLANG_VERSION_STRING 71 class AnalyzerOptions;
72 class DiagnosticsEngine;
98 : Initialize(Fn), FullName(Name), Desc(Desc),
99 DocumentationUri(DocsUri) {}
106 template <
typename T>
120 void addChecker(StringRef FullName, StringRef Desc, StringRef DocsUri) {
123 addChecker(&CheckerRegistry::initializeManager<T>, FullName, Desc, DocsUri);
138 void printHelp(raw_ostream &out,
size_t maxNameChars = 30)
const;
145 mutable llvm::StringMap<size_t> Packages;
153 #endif // LLVM_CLANG_STATICANALYZER_CORE_CHECKERREGISTRY_H Manages a set of available checkers for running a static analysis.
llvm::SetVector< const CheckerRegistry::CheckerInfo * > CheckerInfoSet
void printList(raw_ostream &out, const AnalyzerOptions &opts) const
InitializationFunction Initialize
CheckerRegistry(ArrayRef< std::string > plugins, DiagnosticsEngine &diags)
CheckerInfo(InitializationFunction Fn, StringRef Name, StringRef Desc, StringRef DocsUri)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Concrete class used by the front-end to report problems and issues.
void validateCheckerOptions(const AnalyzerOptions &opts) const
Check if every option corresponds to a specific checker or package.
Defines version macros and version-related utility functions for Clang.
void addChecker(InitializationFunction Fn, StringRef FullName, StringRef Desc, StringRef DocsUri)
Adds a checker to the registry.
CHECKER * registerChecker(AT &&... Args)
Used to register checkers.
Dataflow Directional Tag Classes.
void(*)(CheckerManager &) InitializationFunction
Initialization functions perform any necessary setup for a checker.
std::vector< CheckerInfo > CheckerInfoList
void addChecker(StringRef FullName, StringRef Desc, StringRef DocsUri)
Adds a checker to the registry.
Stores options for the analyzer from the command line.
StringRef DocumentationUri
void printHelp(raw_ostream &out, size_t maxNameChars=30) const
Prints the name and description of all checkers in this registry.