]> granicus.if.org Git - clang/blob - include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
Header guard canonicalization, clang part.
[clang] / include / clang / StaticAnalyzer / Frontend / AnalysisConsumer.h
1 //===--- AnalysisConsumer.h - Front-end Analysis Engine Hooks ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header contains the functions necessary for a front-end to run various
11 // analyses.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_ANALYSISCONSUMER_H
16 #define LLVM_CLANG_STATICANALYZER_FRONTEND_ANALYSISCONSUMER_H
17
18 #include "clang/AST/ASTConsumer.h"
19 #include "clang/Basic/LLVM.h"
20 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
21 #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
22 #include <string>
23
24 namespace clang {
25
26 class Preprocessor;
27 class DiagnosticsEngine;
28
29 namespace ento {
30 class CheckerManager;
31
32 class AnalysisASTConsumer : public ASTConsumer {
33 public:
34   virtual void AddDiagnosticConsumer(PathDiagnosticConsumer *Consumer) = 0;
35 };
36
37 /// CreateAnalysisConsumer - Creates an ASTConsumer to run various code
38 /// analysis passes.  (The set of analyses run is controlled by command-line
39 /// options.)
40 std::unique_ptr<AnalysisASTConsumer>
41 CreateAnalysisConsumer(const Preprocessor &pp, const std::string &output,
42                        AnalyzerOptionsRef opts, ArrayRef<std::string> plugins);
43
44 } // end GR namespace
45
46 } // end clang namespace
47
48 #endif