clang 10.0.0git

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::ento::AnalysisManager Class Reference

`#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"`

Inheritance diagram for clang::ento::AnalysisManager:
[legend]
Collaboration diagram for clang::ento::AnalysisManager:
[legend]

## Public Member Functions
| AnalysisManager (ASTContext &ctx, const PathDiagnosticConsumers &Consumers, StoreManagerCreator storemgr, ConstraintManagerCreator constraintmgr, CheckerManager *checkerMgr, AnalyzerOptions &Options, CodeInjector *injector=nullptr)
| ~AnalysisManager () override
void | ClearContexts ()
AnalysisDeclContextManager & | getAnalysisDeclContextManager ()
StoreManagerCreator | getStoreManagerCreator ()
AnalyzerOptions & | getAnalyzerOptions () override
ConstraintManagerCreator | getConstraintManagerCreator ()
CheckerManager * | getCheckerManager () const
ASTContext & | getASTContext () override
SourceManager & | getSourceManager () override
const LangOptions & | getLangOpts () const
ArrayRef< PathDiagnosticConsumer * > | getPathDiagnosticConsumers () override
void | FlushDiagnostics ()
bool | shouldVisualize () const
bool | shouldInlineCall () const
CFG * | getCFG (Decl const *D)
template<typename T >
T * | getAnalysis (Decl const *D)
ParentMap & | getParentMap (Decl const *D)
AnalysisDeclContext * | getAnalysisDeclContext (const Decl *D)
bool | isInCodeFile (SourceLocation SL)
Public Member Functions inherited from clang::ento::BugReporterData
virtual | ~BugReporterData ()=default

## Static Public Member Functions
static bool | isInCodeFile (SourceLocation SL, const SourceManager &SM)

## Public Attributes
AnalyzerOptions & | options

## Detailed Description

Definition at line 30 of file AnalysisManager.h.

## Constructor & Destructor Documentation

## ◆ AnalysisManager()

AnalysisManager::AnalysisManager | ( | ASTContext & | ctx,
|  | const PathDiagnosticConsumers & | Consumers,
|  | StoreManagerCreator | storemgr,
|  | ConstraintManagerCreator | constraintmgr,
|  | CheckerManager * | checkerMgr,
|  | AnalyzerOptions & | Options,
|  | CodeInjector * | injector = `nullptr`
| ) |  |

Definition at line 16 of file AnalysisManager.cpp.

## ◆ ~AnalysisManager()

AnalysisManager::~AnalysisManager | ( |  | ) |
| override

Definition at line 51 of file AnalysisManager.cpp.

References FlushDiagnostics().

## Member Function Documentation

## ◆ ClearContexts()

void clang::ento::AnalysisManager::ClearContexts | ( |  | ) |
| inline

Definition at line 56 of file AnalysisManager.h.

References clang::AnalysisDeclContextManager::clear().

## ◆ FlushDiagnostics()

void AnalysisManager::FlushDiagnostics | ( |  | ) |

Definition at line 59 of file AnalysisManager.cpp.

Referenced by getPathDiagnosticConsumers(), and ~AnalysisManager().

## ◆ getAnalysis()

template<typename T >

T* clang::ento::AnalysisManager::getAnalysis | ( | Decl const * | D | ) |
| inline

Definition at line 109 of file AnalysisManager.h.

References clang::AnalysisDeclContext::getAnalysis(), and clang::AnalysisDeclContextManager::getContext().

## ◆ getAnalysisDeclContext()

AnalysisDeclContext* clang::ento::AnalysisManager::getAnalysisDeclContext | ( | const Decl * | D | ) |
| inline

Definition at line 117 of file AnalysisManager.h.

References clang::AnalysisDeclContextManager::getContext().

Referenced by clang::ento::ExprEngine::processCallExit().

## ◆ getAnalysisDeclContextManager()

AnalysisDeclContextManager& clang::ento::AnalysisManager::getAnalysisDeclContextManager | ( |  | ) |
| inline

Definition at line 60 of file AnalysisManager.h.

Referenced by clang::ento::ExprEngine::getAnalysisDeclContextManager().

## ◆ getAnalyzerOptions()

AnalyzerOptions& clang::ento::AnalysisManager::getAnalyzerOptions | ( |  | ) |
| inline override virtual

Implements clang::ento::BugReporterData.

Definition at line 68 of file AnalysisManager.h.

References options.

Referenced by clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::ExprEngine::processCallExit(), and clang::ento::ExprEngine::VisitCXXNewExpr().

## ◆ getASTContext()

ASTContext& clang::ento::AnalysisManager::getASTContext | ( |  | ) |
| inline override virtual

Implements clang::ento::BugReporterData.

Definition at line 78 of file AnalysisManager.h.

Referenced by clang::ento::ExprEngine::getContext(), getSourceManager(), and isInCodeFile().

## ◆ getCFG()

CFG* clang::ento::AnalysisManager::getCFG | ( | Decl const * | D | ) |
| inline

Definition at line 104 of file AnalysisManager.h.

References clang::AnalysisDeclContext::getCFG(), and clang::AnalysisDeclContextManager::getContext().

## ◆ getCheckerManager()

CheckerManager* clang::ento::AnalysisManager::getCheckerManager | ( |  | ) | const
| inline

Definition at line 76 of file AnalysisManager.h.

Referenced by clang::ento::ExprEngine::getCheckerManager().

## ◆ getConstraintManagerCreator()

ConstraintManagerCreator clang::ento::AnalysisManager::getConstraintManagerCreator | ( |  | ) |
| inline

Definition at line 72 of file AnalysisManager.h.

## ◆ getLangOpts()

const LangOptions& clang::ento::AnalysisManager::getLangOpts | ( |  | ) | const
| inline

Definition at line 86 of file AnalysisManager.h.

## ◆ getParentMap()

ParentMap& clang::ento::AnalysisManager::getParentMap | ( | Decl const * | D | ) |
| inline

Definition at line 113 of file AnalysisManager.h.

References clang::AnalysisDeclContextManager::getContext(), and clang::AnalysisDeclContext::getParentMap().

## ◆ getPathDiagnosticConsumers()

ArrayRef<PathDiagnosticConsumer*> clang::ento::AnalysisManager::getPathDiagnosticConsumers | ( |  | ) |
| inline override virtual

Implements clang::ento::BugReporterData.

Definition at line 90 of file AnalysisManager.h.

References FlushDiagnostics().

## ◆ getSourceManager()

SourceManager& clang::ento::AnalysisManager::getSourceManager | ( |  | ) |
| inline override virtual

Implements clang::ento::BugReporterData.

Definition at line 82 of file AnalysisManager.h.

References getASTContext(), and clang::ASTContext::getSourceManager().

## ◆ getStoreManagerCreator()

StoreManagerCreator clang::ento::AnalysisManager::getStoreManagerCreator | ( |  | ) |
| inline

Definition at line 64 of file AnalysisManager.h.

## ◆ isInCodeFile() [1/2]

static bool clang::ento::AnalysisManager::isInCodeFile | ( | SourceLocation | SL,
|  | const SourceManager & | SM
| ) |  |
| inline static

Definition at line 121 of file AnalysisManager.h.

References clang::SourceManager::getFileID(), clang::SourceManager::getFilename(), clang::SourceManager::getIncludeLoc(), clang::SourceManager::isInMainFile(), and clang::SourceLocation::isValid().

Referenced by CompactMacroExpandedPieces(), and isInCodeFile().

## ◆ isInCodeFile() [2/2]

bool clang::ento::AnalysisManager::isInCodeFile | ( | SourceLocation | SL | ) |
| inline

Definition at line 146 of file AnalysisManager.h.

References getASTContext(), clang::ASTContext::getSourceManager(), isInCodeFile(), and SM.

## ◆ shouldInlineCall()

bool clang::ento::AnalysisManager::shouldInlineCall | ( |  | ) | const
| inline

Definition at line 100 of file AnalysisManager.h.

References clang::AnalyzerOptions::getIPAMode(), and clang::IPAK_None.

## ◆ shouldVisualize()

bool clang::ento::AnalysisManager::shouldVisualize | ( |  | ) | const
| inline

Definition at line 96 of file AnalysisManager.h.

References clang::AnalyzerOptions::visualizeExplodedGraphWithGraphViz.

## Member Data Documentation

## ◆ options

AnalyzerOptions& clang::ento::AnalysisManager::options

Definition at line 45 of file AnalysisManager.h.

Referenced by getAnalyzerOptions(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), clang::ento::SValBuilder::makeSymExprValNN(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::ProcessLoopExit(), and clang::ento::ExprEngine::ProcessNewAllocator().

The documentation for this class was generated from the following files:

- include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
- lib/StaticAnalyzer/Core/AnalysisManager.cpp