clang API Documentation

AnalysisConsumer.h
Go to the documentation of this file.
00001 //===--- AnalysisConsumer.h - Front-end Analysis Engine Hooks ---*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This header contains the functions necessary for a front-end to run various
00011 // analyses.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_ANALYSISCONSUMER_H
00016 #define LLVM_CLANG_STATICANALYZER_FRONTEND_ANALYSISCONSUMER_H
00017 
00018 #include "clang/AST/ASTConsumer.h"
00019 #include "clang/Basic/LLVM.h"
00020 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
00021 #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
00022 #include <string>
00023 
00024 namespace clang {
00025 
00026 class Preprocessor;
00027 class DiagnosticsEngine;
00028 class CodeInjector;
00029 class CompilerInstance;
00030 
00031 namespace ento {
00032 class CheckerManager;
00033 
00034 class AnalysisASTConsumer : public ASTConsumer {
00035 public:
00036   virtual void AddDiagnosticConsumer(PathDiagnosticConsumer *Consumer) = 0;
00037 };
00038 
00039 /// CreateAnalysisConsumer - Creates an ASTConsumer to run various code
00040 /// analysis passes.  (The set of analyses run is controlled by command-line
00041 /// options.)
00042 std::unique_ptr<AnalysisASTConsumer>
00043 CreateAnalysisConsumer(CompilerInstance &CI);
00044 
00045 } // end GR namespace
00046 
00047 } // end clang namespace
00048 
00049 #endif