1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | #ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_FRONTENDACTIONS_H |
10 | #define LLVM_CLANG_STATICANALYZER_FRONTEND_FRONTENDACTIONS_H |
11 | |
12 | #include "clang/Frontend/FrontendAction.h" |
13 | #include "llvm/ADT/StringMap.h" |
14 | #include "llvm/ADT/StringRef.h" |
15 | |
16 | namespace clang { |
17 | |
18 | class Stmt; |
19 | class AnalyzerOptions; |
20 | |
21 | namespace ento { |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | class AnalysisAction : public ASTFrontendAction { |
28 | protected: |
29 | std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, |
30 | StringRef InFile) override; |
31 | }; |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | class ParseModelFileAction : public ASTFrontendAction { |
42 | public: |
43 | ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies); |
44 | bool isModelParsingAction() const override { return true; } |
45 | |
46 | protected: |
47 | std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, |
48 | StringRef InFile) override; |
49 | |
50 | private: |
51 | llvm::StringMap<Stmt *> &Bodies; |
52 | }; |
53 | |
54 | void printCheckerHelp(raw_ostream &OS, |
55 | ArrayRef<std::string> plugins, |
56 | AnalyzerOptions &opts, |
57 | DiagnosticsEngine &diags, |
58 | const LangOptions &LangOpts); |
59 | void printEnabledCheckerList(raw_ostream &OS, ArrayRef<std::string> plugins, |
60 | AnalyzerOptions &opts, |
61 | DiagnosticsEngine &diags, |
62 | const LangOptions &LangOpts); |
63 | void printAnalyzerConfigList(raw_ostream &OS); |
64 | |
65 | } |
66 | |
67 | } |
68 | |
69 | #endif |
70 | |