-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAnalyzer.h
41 lines (40 loc) · 1.11 KB
/
Analyzer.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef ANALYZER_H
#define ANALYZER_H
#include <string>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
#include <clang/Analysis/Analyses/LiveVariables.h>
#include <clang/Analysis/Analyses/ReachableCode.h>
#include <clang/Analysis/AnalysisContext.h>
#include <clang/Analysis/CFG.h>
#include <clang/Analysis/FlowSensitive/DataflowSolver.h>
using namespace clang;
#include "CodeHandler.h"
#include "Analysis/AnalysisConsumer.h"
namespace differential
{
class Analyzer : public CodeHandler
{
private:
AnalyzerOptions analyzer_options_;
public:
ASTContext * contex_ptr_;
Analyzer();
~Analyzer() { }
DiagnosticsEngine& getDiagnosticsEngine() {
return diagnostics_engine_;
}
void emitDiagnosticsToOut() {
TextDiagnosticPrinter *tdp_ptr = new TextDiagnosticPrinter(llvm::outs(), diagnostic_options_);
tdp_ptr->BeginSourceFile(language_options_, preprocessor_ptr_);
diagnostics_engine_.setClient(tdp_ptr);
}
void RunAnalysis(ostream& report_file = cout);
//void RunGRExprAnalysis();
static int Main(int argc, char *argv[]);
};
}
#endif