1*ccbda6b0SDon Hinton #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" 2*ccbda6b0SDon Hinton #include "clang/StaticAnalyzer/Core/Checker.h" 3*ccbda6b0SDon Hinton #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" 4*ccbda6b0SDon Hinton #include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h" 5*ccbda6b0SDon Hinton 6*ccbda6b0SDon Hinton using namespace clang; 7*ccbda6b0SDon Hinton using namespace ento; 8*ccbda6b0SDon Hinton 9*ccbda6b0SDon Hinton namespace { 10*ccbda6b0SDon Hinton struct Dependency : public Checker<check::BeginFunction> { checkBeginFunction__anond7a87e720111::Dependency11*ccbda6b0SDon Hinton void checkBeginFunction(CheckerContext &Ctx) const {} 12*ccbda6b0SDon Hinton }; 13*ccbda6b0SDon Hinton struct DependendentChecker : public Checker<check::BeginFunction> { checkBeginFunction__anond7a87e720111::DependendentChecker14*ccbda6b0SDon Hinton void checkBeginFunction(CheckerContext &Ctx) const {} 15*ccbda6b0SDon Hinton }; 16*ccbda6b0SDon Hinton } // end anonymous namespace 17*ccbda6b0SDon Hinton 18*ccbda6b0SDon Hinton // Register plugin! clang_registerCheckers(CheckerRegistry & registry)19*ccbda6b0SDon Hintonextern "C" void clang_registerCheckers(CheckerRegistry ®istry) { 20*ccbda6b0SDon Hinton registry.addChecker<Dependency>("example.Dependency", "", ""); 21*ccbda6b0SDon Hinton registry.addChecker<DependendentChecker>("example.DependendentChecker", "", 22*ccbda6b0SDon Hinton ""); 23*ccbda6b0SDon Hinton 24*ccbda6b0SDon Hinton registry.addDependency("example.DependendentChecker", "example.Dependency"); 25*ccbda6b0SDon Hinton } 26*ccbda6b0SDon Hinton 27*ccbda6b0SDon Hinton extern "C" const char clang_analyzerAPIVersionString[] = 28*ccbda6b0SDon Hinton CLANG_ANALYZER_API_VERSION_STRING; 29