clang 20.0.0git
Public Member Functions | Friends | List of all members
clang::AnalysisDeclContextManager Class Reference

#include "clang/Analysis/AnalysisDeclContext.h"

Public Member Functions

 AnalysisDeclContextManager (ASTContext &ASTCtx, bool useUnoptimizedCFG=false, bool addImplicitDtors=false, bool addInitializers=false, bool addTemporaryDtors=false, bool addLifetime=false, bool addLoopExit=false, bool addScopes=false, bool synthesizeBodies=false, bool addStaticInitBranches=false, bool addCXXNewAllocator=true, bool addRichCXXConstructors=true, bool markElidedCXXConstructors=true, bool addVirtualBaseBranches=true, CodeInjector *injector=nullptr)
 
AnalysisDeclContextgetContext (const Decl *D)
 
bool getUseUnoptimizedCFG () const
 
CFG::BuildOptionsgetCFGBuildOptions ()
 
bool synthesizeBodies () const
 
const StackFrameContextgetStackFrame (const Decl *D)
 Obtain the beginning context of the analysis.
 
const StackFrameContextgetStackFrame (AnalysisDeclContext *ADC, const LocationContext *Parent, const Stmt *S, const CFGBlock *Block, unsigned BlockCount, unsigned Index)
 Obtain a context of the call stack using its parent context.
 
BodyFarmgetBodyFarm ()
 
void clear ()
 Discard all previously created AnalysisDeclContexts.
 

Friends

class AnalysisDeclContext
 

Detailed Description

Definition at line 425 of file AnalysisDeclContext.h.

Constructor & Destructor Documentation

◆ AnalysisDeclContextManager()

AnalysisDeclContextManager::AnalysisDeclContextManager ( ASTContext ASTCtx,
bool  useUnoptimizedCFG = false,
bool  addImplicitDtors = false,
bool  addInitializers = false,
bool  addTemporaryDtors = false,
bool  addLifetime = false,
bool  addLoopExit = false,
bool  addScopes = false,
bool  synthesizeBodies = false,
bool  addStaticInitBranches = false,
bool  addCXXNewAllocator = true,
bool  addRichCXXConstructors = true,
bool  markElidedCXXConstructors = true,
bool  addVirtualBaseBranches = true,
CodeInjector injector = nullptr 
)

Member Function Documentation

◆ clear()

void AnalysisDeclContextManager::clear ( )

Discard all previously created AnalysisDeclContexts.

Definition at line 91 of file AnalysisDeclContext.cpp.

Referenced by clang::ento::AnalysisManager::ClearContexts().

◆ getBodyFarm()

BodyFarm & AnalysisDeclContextManager::getBodyFarm ( )

Definition at line 308 of file AnalysisDeclContext.cpp.

Referenced by clang::AnalysisDeclContext::getBody().

◆ getCFGBuildOptions()

CFG::BuildOptions & clang::AnalysisDeclContextManager::getCFGBuildOptions ( )
inline

◆ getContext()

AnalysisDeclContext * AnalysisDeclContextManager::getContext ( const Decl D)

◆ getStackFrame() [1/2]

const StackFrameContext * clang::AnalysisDeclContextManager::getStackFrame ( AnalysisDeclContext ADC,
const LocationContext Parent,
const Stmt S,
const CFGBlock Block,
unsigned  BlockCount,
unsigned  Index 
)
inline

Obtain a context of the call stack using its parent context.

Parameters
ADCThe AnalysisDeclContext.
ParentLCThe parent context of this newly created context.
SThe call.
BlockThe basic block.
BlockCountThe current count of entering into Blk.
IndexThe index of Blk.
Returns
The context for D with parent context ParentLC.

Definition at line 476 of file AnalysisDeclContext.h.

References clang::Block, clang::LocationContextManager::getStackFrame(), and Parent.

◆ getStackFrame() [2/2]

const StackFrameContext * clang::AnalysisDeclContextManager::getStackFrame ( const Decl D)
inline

Obtain the beginning context of the analysis.

Returns
The top level stack frame for D.

Definition at line 470 of file AnalysisDeclContext.h.

References D, getContext(), and clang::LocationContextManager::getStackFrame().

Referenced by clang::ento::CallEvent::getCalleeStackFrame().

◆ getUseUnoptimizedCFG()

bool clang::AnalysisDeclContextManager::getUseUnoptimizedCFG ( ) const
inline

◆ synthesizeBodies()

bool clang::AnalysisDeclContextManager::synthesizeBodies ( ) const
inline
Returns
Whether faux bodies should be synthesized for known functions.

Definition at line 465 of file AnalysisDeclContext.h.

Referenced by clang::AnalysisDeclContext::getBody().

Friends And Related Function Documentation

◆ AnalysisDeclContext

friend class AnalysisDeclContext
friend

Definition at line 489 of file AnalysisDeclContext.h.


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