You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.0 KiB
29 lines
1.0 KiB
4 months ago
|
#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;
|