1#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
2#include "clang/StaticAnalyzer/Core/Checker.h"
3#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
4#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
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>(FullName: "example.Dependency", Desc: "", DocsUri: "");
21 registry.addChecker<DependendentChecker>(FullName: "example.DependendentChecker", Desc: "",
22 DocsUri: "");
23
24 registry.addDependency(FullName: "example.DependendentChecker", Dependency: "example.Dependency");
25}
26
27extern "C" const char clang_analyzerAPIVersionString[] =
28 CLANG_ANALYZER_API_VERSION_STRING;
29