29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
|
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
|
||
|
#include "clang/StaticAnalyzer/Core/Checker.h"
|
||
|
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
|
||
|
#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
|
||
|
|
||
|
using namespace clang;
|
||
|
using namespace ento;
|
||
|
|
||
|
namespace {
|
||
|
struct Dependency : public Checker<check::BeginFunction> {
|
||
|
void checkBeginFunction(CheckerContext &Ctx) const {}
|
||
|
};
|
||
|
struct DependendentChecker : public Checker<check::BeginFunction> {
|
||
|
void checkBeginFunction(CheckerContext &Ctx) const {}
|
||
|
};
|
||
|
} // end anonymous namespace
|
||
|
|
||
|
// Register plugin!
|
||
|
extern "C" void clang_registerCheckers(CheckerRegistry ®istry) {
|
||
|
registry.addChecker<Dependency>("example.Dependency", "", "");
|
||
|
registry.addChecker<DependendentChecker>("example.DependendentChecker", "",
|
||
|
"");
|
||
|
|
||
|
registry.addDependency("example.DependendentChecker", "example.Dependency");
|
||
|
}
|
||
|
|
||
|
extern "C" const char clang_analyzerAPIVersionString[] =
|
||
|
CLANG_ANALYZER_API_VERSION_STRING;
|