clang 20.0.0git
FrontendActions.cpp
Go to the documentation of this file.
1//===--- FrontendActions.cpp ----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
12using namespace clang;
13using namespace ento;
14
15std::unique_ptr<ASTConsumer>
17 return CreateAnalysisConsumer(CI);
18}
19
20ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
21 : Bodies(Bodies) {}
22
23std::unique_ptr<ASTConsumer>
25 StringRef InFile) {
26 return std::make_unique<ModelConsumer>(Bodies);
27}
This file implements clang::ento::ModelConsumer which is an ASTConsumer for model files.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
ParseModelFileAction(llvm::StringMap< Stmt * > &Bodies)
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
std::unique_ptr< AnalysisASTConsumer > CreateAnalysisConsumer(CompilerInstance &CI)
CreateAnalysisConsumer - Creates an ASTConsumer to run various code analysis passes.
The JSON file list parser is used to communicate input to InstallAPI.