clang API Documentation
Frontend action to parse model files. More...
#include <FrontendActions.h>
Public Member Functions | |
ParseModelFileAction (llvm::StringMap< Stmt * > &Bodies) | |
bool | isModelParsingAction () const override |
Is this action invoked on a model file? | |
Protected Member Functions | |
std::unique_ptr< ASTConsumer > | CreateASTConsumer (CompilerInstance &CI, StringRef InFile) override |
Create the AST consumer object for this action, if supported. |
Frontend action to parse model files.
This frontend action is responsible for parsing model files. Model files can not be parsed on their own, they rely on type information that is available in another translation unit. The parsing of model files is done by a separate compiler instance that reuses the ASTContext and othen information from the main translation unit that is being compiled. After a model file is parsed, the function definitions will be collected into a StringMap.
Definition at line 41 of file StaticAnalyzer/Frontend/FrontendActions.h.
ParseModelFileAction::ParseModelFileAction | ( | llvm::StringMap< Stmt * > & | Bodies | ) |
Definition at line 21 of file StaticAnalyzer/Frontend/FrontendActions.cpp.
std::unique_ptr< ASTConsumer > ParseModelFileAction::CreateASTConsumer | ( | CompilerInstance & | CI, |
StringRef | InFile | ||
) | [override, protected, virtual] |
Create the AST consumer object for this action, if supported.
This routine is called as part of BeginSourceFile(), which will fail if the AST consumer cannot be created. This will not be called if the action has indicated that it only uses the preprocessor.
CI | - The current compiler instance, provided as a convenience, see getCompilerInstance(). |
InFile | - The current input file, provided as a convenience, see getCurrentFile(). |
Implements clang::FrontendAction.
Definition at line 25 of file StaticAnalyzer/Frontend/FrontendActions.cpp.
bool clang::ento::ParseModelFileAction::isModelParsingAction | ( | ) | const [inline, override, virtual] |
Is this action invoked on a model file?
Model files are incomplete translation units that relies on type information from another translation unit. Check ParseModelFileAction for details.
Reimplemented from clang::FrontendAction.
Definition at line 44 of file StaticAnalyzer/Frontend/FrontendActions.h.