clang: clang::AnalysisDeclContext Class Reference (original) (raw)

AnalysisDeclContext contains the context data for the function, method or block under analysis. More...

#include "[clang/Analysis/AnalysisDeclContext.h](AnalysisDeclContext%5F8h%5Fsource.html)"

Public Member Functions
AnalysisDeclContext (AnalysisDeclContextManager *Mgr, const Decl *D)
AnalysisDeclContext (AnalysisDeclContextManager *Mgr, const Decl *D, const CFG::BuildOptions &BuildOptions)
~AnalysisDeclContext ()
ASTContext & getASTContext () const
const Decl * getDecl () const
AnalysisDeclContextManager * getManager () const
CFG::BuildOptions & getCFGBuildOptions ()
const CFG::BuildOptions & getCFGBuildOptions () const
bool getAddEHEdges () const
bool getUseUnoptimizedCFG () const
bool getAddImplicitDtors () const
bool getAddInitializers () const
void registerForcedBlockExpression (const Stmt *stmt)
const CFGBlock * getBlockForRegisteredExpression (const Stmt *stmt)
Stmt * getBody () const
Stmt * getBody (bool &IsAutosynthesized) const
bool isBodyAutosynthesized () const
bool isBodyAutosynthesizedFromModelFile () const
CFG * getCFG ()
CFGStmtMap * getCFGStmtMap ()
CFGReverseBlockReachabilityAnalysis * getCFGReachablityAnalysis ()
CFG * getUnoptimizedCFG ()
void dumpCFG (bool ShowColors)
bool isCFGBuilt () const
ParentMap & getParentMap ()
llvm::iterator_range< referenced_decls_iterator > getReferencedBlockVars (const BlockDecl *BD)
const ImplicitParamDecl * getSelfDecl () const
const StackFrameContext * getStackFrame (LocationContext const *ParentLC, const Stmt *S, const CFGBlock *Blk, unsigned BlockCount, unsigned Index)
Obtain a context of the call stack using its parent context.
const BlockInvocationContext * getBlockInvocationContext (const LocationContext *ParentLC, const BlockDecl *BD, const void *Data)
Obtain a context of the block invocation using its parent context.
template<typename T >
T * getAnalysis ()

AnalysisDeclContext contains the context data for the function, method or block under analysis.

Definition at line 72 of file AnalysisDeclContext.h.

referenced_decls_iterator

AnalysisDeclContext() [2/2]

~AnalysisDeclContext()

AnalysisDeclContext::~AnalysisDeclContext ( )

dumpCFG()

void AnalysisDeclContext::dumpCFG ( bool ShowColors )

getAddEHEdges()

bool clang::AnalysisDeclContext::getAddEHEdges ( ) const inline

Returns

Whether we are adding exception handling edges from CallExprs. If this is false, then try/catch statements and blocks reachable from them can appear to be dead in the CFG, analysis passes must cope with that.

Definition at line 119 of file AnalysisDeclContext.h.

References clang::CFG::BuildOptions::AddEHEdges.

getAddImplicitDtors()

bool clang::AnalysisDeclContext::getAddImplicitDtors ( ) const inline

getAddInitializers()

bool clang::AnalysisDeclContext::getAddInitializers ( ) const inline

getAnalysis()

template<typename T >

T * clang::AnalysisDeclContext::getAnalysis ( ) inline

getASTContext()

ASTContext & clang::AnalysisDeclContext::getASTContext ( ) const inline

Definition at line 104 of file AnalysisDeclContext.h.

References D.

Referenced by clang::ento::SValBuilder::conjureSymbolVal(), dumpCFG(), clang::LocationContext::dumpStack(), clang::ento::getWidenedLoopState(), clang::ento::isPossiblyEscaped(), printIndicesOfElementsToConstructJson(), clang::ProgramPoint::printJson(), clang::LocationContext::printJson(), printObjectsUnderConstructionJson(), printPendingInitLoopJson(), and clang::threadSafety::CFGWalker::walk().

getBlockForRegisteredExpression()

const CFGBlock * AnalysisDeclContext::getBlockForRegisteredExpression ( const Stmt * stmt )

getBlockInvocationContext()

getBody() [1/2]

Stmt * AnalysisDeclContext::getBody ( ) const

Returns

The body of the stored Decl D.

Definition at line 126 of file AnalysisDeclContext.cpp.

References getBody().

Referenced by getBody(), getCFG(), getLocationForCaller(), getParentMap(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), getUnoptimizedCFG(), clang::ento::PathDiagnosticLocation::getValidSourceLocation(), isBodyAutosynthesized(), isBodyAutosynthesizedFromModelFile(), clang::ento::ExprEngine::processCallExit(), and clang::ento::ExprEngine::removeDeadOnEndOfFunction().

getBody() [2/2]

Stmt * AnalysisDeclContext::getBody ( bool & IsAutosynthesized ) const

getCFG()

CFG * AnalysisDeclContext::getCFG ( )

Definition at line 213 of file AnalysisDeclContext.cpp.

References addParentsForSyntheticStmts(), clang::CFG::buildCFG(), clang::Decl::getASTContext(), getBody(), getCFGBuildOptions(), getUnoptimizedCFG(), clang::CFG::BuildOptions::Observer, and clang::CFG::BuildOptions::PruneTriviallyFalseEdges.

Referenced by clang::PostOrderCFGView::create(), dumpCFG(), clang::ento::AnalysisManager::getCFG(), getCFGReachablityAnalysis(), getCFGStmtMap(), and getParentMap().

getCFGBuildOptions() [1/2]

getCFGBuildOptions() [2/2]

const CFG::BuildOptions & clang::AnalysisDeclContext::getCFGBuildOptions ( ) const inline

getCFGReachablityAnalysis()

getCFGStmtMap()

CFGStmtMap * AnalysisDeclContext::getCFGStmtMap ( )

getDecl()

const Decl * clang::AnalysisDeclContext::getDecl ( ) const inline

getFunctionName()

std::string AnalysisDeclContext::getFunctionName ( const Decl * D) static

getManager()

getParentMap()

ParentMap & AnalysisDeclContext::getParentMap ( )

getReferencedBlockVars()

getSelfDecl()

getStackFrame()

getUnoptimizedCFG()

CFG * AnalysisDeclContext::getUnoptimizedCFG ( )

getUseUnoptimizedCFG()

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

isBodyAutosynthesized()

bool AnalysisDeclContext::isBodyAutosynthesized ( ) const

isBodyAutosynthesizedFromModelFile()

bool AnalysisDeclContext::isBodyAutosynthesizedFromModelFile ( ) const

isCFGBuilt()

bool clang::AnalysisDeclContext::isCFGBuilt ( ) const inline

Returns

Whether we have built a CFG for this analysis context.

Note

This doesn't correspond to whether or not a valid CFG exists, it corresponds to whether we attempted to build one.

Definition at line 167 of file AnalysisDeclContext.h.

isInStdNamespace()

bool AnalysisDeclContext::isInStdNamespace ( const Decl * D) static

registerForcedBlockExpression()

void AnalysisDeclContext::registerForcedBlockExpression ( const Stmt * stmt )

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