blob: badb6719215eb611ff002cef6d27c6a0b6ed14bc (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "ClangSACheckers.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/Analysis/Analyses/Interval.h"
#include "clang/Analysis/CallGraph.h"
#include "llvm/Support/Process.h"
using namespace clang;
using namespace ento;
namespace {
class IntervalTest: public Checker<check::ASTCodeBody> {
public:
void checkASTCodeBody(const Decl *D, AnalysisManager& mgr,
BugReporter &BR) const {
if (IntervalAnalysis *a = mgr.getAnalysis<IntervalAnalysis>(D)) {
a->runOnAllBlocks(*D);
}
}
};
}
void ento::registerIntervalTestChecker(CheckerManager &mgr) {
mgr.registerChecker<IntervalTest>();
}
|