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)"
| Static Public Member Functions | |
|---|---|
| static bool | isInStdNamespace (const Decl *D) |
| static std::string | getFunctionName (const Decl *D) |
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.
Referenced by CheckFallThrough().
◆ 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.
Referenced by areAllValuesNoReturn(), clang::ento::SValBuilder::conjureSymbolVal(), dumpCFG(), clang::LocationContext::dumpStack(), clang::reachable_code::FindUnreachableCode(), clang::ento::getWidenedLoopState(), clang::ento::isPossiblyEscaped(), printIndicesOfElementsToConstructJson(), clang::LocationContext::printJson(), clang::ProgramPoint::printJson(), printObjectsUnderConstructionJson(), printPendingInitLoopJson(), clang::consumed::ConsumedAnalyzer::run(), and timeTraceMetadata().
◆ 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 129 of file AnalysisDeclContext.cpp.
References getBody().
Referenced by DiagnoseSwitchLabelsFallthrough(), 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 216 of file AnalysisDeclContext.cpp.
References addParentsForSyntheticStmts(), clang::CFG::buildCFG(), getBody(), getCFGBuildOptions(), getUnoptimizedCFG(), and clang::CFG::BuildOptions::Observer.
Referenced by areAllValuesNoReturn(), CheckFallThrough(), checkRecursiveFunction(), checkThrowInNonThrowingFunc(), clang::LiveVariables::computeLiveness(), clang::PostOrderCFGView::create(), DiagnoseSwitchLabelsFallthrough(), dumpCFG(), emitPossiblyUnreachableDiags(), clang::reachable_code::FindUnreachableCode(), getCFGReachablityAnalysis(), getCFGStmtMap(), getParentMap(), clang::threadSafety::CFGWalker::init(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::consumed::ConsumedAnalyzer::run(), and clang::LiveVariables::runOnAllBlocks().
◆ 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 |
|---|
Definition at line 106 of file AnalysisDeclContext.h.
Referenced by CheckUnreachable(), DiagnoseSwitchLabelsFallthrough(), clang::lifetimes::internal::FactManager::dump(), emitDiagnostics(), emitDiagnostics(), emitDiagnostics(), getLocationForCaller(), getParentMap(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), clang::ento::PathDiagnosticLocation::getValidSourceLocation(), clang::threadSafety::CFGWalker::init(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), and clang::consumed::ConsumedAnalyzer::run().
◆ getFunctionName()
| std::string AnalysisDeclContext::getFunctionName ( const Decl * D) | static |
|---|
◆ getManager()
◆ getParentMap()
| ParentMap & AnalysisDeclContext::getParentMap | ( | ) |
|---|
◆ getReferencedBlockVars()
| llvm::iterator_range< AnalysisDeclContext::referenced_decls_iterator > AnalysisDeclContext::getReferencedBlockVars | ( | const BlockDecl * | BD | ) |
|---|
◆ getSelfDecl()
◆ getStackFrame()
Obtain a context of the call stack using its parent context.
Parameters
| ADC | The AnalysisDeclContext. |
|---|---|
| ParentLC | The parent context of this newly created context. |
| S | The call. |
| Block | The basic block. |
| BlockCount | The current count of entering into Blk. |
| Index | The index of Blk. |
Returns
The context for D with parent context ParentLC.
Definition at line 314 of file AnalysisDeclContext.cpp.
References clang::LocationContext::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 |
|---|
◆ 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:
- include/clang/Analysis/AnalysisDeclContext.h
- lib/Analysis/AnalysisDeclContext.cpp