These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
28 lines
966 B
C++
28 lines
966 B
C++
#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;
|