clang 20.0.0git
CheckerDependencyHandling.cpp
Go to the documentation of this file.
5
6using namespace clang;
7using namespace ento;
8
9namespace {
10struct Dependency : public Checker<check::BeginFunction> {
11 void checkBeginFunction(CheckerContext &Ctx) const {}
12};
13struct DependendentChecker : public Checker<check::BeginFunction> {
14 void checkBeginFunction(CheckerContext &Ctx) const {}
15};
16} // end anonymous namespace
17
18// Register plugin!
19extern "C" void clang_registerCheckers(CheckerRegistry &registry) {
20 registry.addChecker<Dependency>("example.Dependency", "", "");
21 registry.addChecker<DependendentChecker>("example.DependendentChecker", "",
22 "");
23
24 registry.addDependency("example.DependendentChecker", "example.Dependency");
25}
26
27extern "C" const char clang_analyzerAPIVersionString[] =
void clang_registerCheckers(CheckerRegistry &registry)
const char clang_analyzerAPIVersionString[]
#define CLANG_ANALYZER_API_VERSION_STRING
Manages a set of available checkers for running a static analysis.
void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, StringRef FullName, StringRef Desc, StringRef DocsUri, bool IsHidden)
Adds a checker to the registry.
void addDependency(StringRef FullName, StringRef Dependency)
Makes the checker with the full name fullName depend on the checker called dependency.
The JSON file list parser is used to communicate input to InstallAPI.