mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-28 15:58:57 -04:00

Summary: This allows for a better alternative to the FrontendAction hack used in clang-tidy in order to get static analyzer's ASTConsumer. Reviewers: jordan_rose, krememek Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2505 llvm-svn: 198426
24 lines
927 B
C++
24 lines
927 B
C++
//===--- FrontendActions.cpp ----------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
|
|
#include "clang/Frontend/CompilerInstance.h"
|
|
#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
|
|
using namespace clang;
|
|
using namespace ento;
|
|
|
|
ASTConsumer *AnalysisAction::CreateASTConsumer(CompilerInstance &CI,
|
|
StringRef InFile) {
|
|
return CreateAnalysisConsumer(CI.getPreprocessor(),
|
|
CI.getFrontendOpts().OutputFile,
|
|
CI.getAnalyzerOpts(),
|
|
CI.getFrontendOpts().Plugins);
|
|
}
|
|
|