blob: 2f3e1556fbaf35d155b4bc7336d9f36162a4cf82 (
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();
}
}
};
}
void ento::registerIntervalTestChecker(CheckerManager &mgr) {
mgr.registerChecker<IntervalTest>();
}
|