llvm-for-llvmta/tools/clang/lib/Analysis/plugins/CheckerDependencyHandling/CheckerDependencyHandling.cpp

29 lines
1.0 KiB
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
#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 &registry) {
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;