clang API Documentation
#include <AnalysisContext.h>
AnalysisDeclContext contains the context data for the function or method under analysis.
Definition at line 69 of file AnalysisContext.h.
| typedef const VarDecl* const* clang::AnalysisDeclContext::referenced_decls_iterator |
Definition at line 152 of file AnalysisContext.h.
| AnalysisDeclContext::AnalysisDeclContext | ( | AnalysisDeclContextManager * | Mgr, |
| const Decl * | D | ||
| ) |
Definition at line 50 of file AnalysisDeclContext.cpp.
References clang::CFG::BuildOptions::forcedBlkExprs.
| AnalysisDeclContext::AnalysisDeclContext | ( | AnalysisDeclContextManager * | Mgr, |
| const Decl * | D, | ||
| const CFG::BuildOptions & | BuildOptions | ||
| ) |
Definition at line 35 of file AnalysisDeclContext.cpp.
References clang::CFG::BuildOptions::forcedBlkExprs.
| AnalysisDeclContext::~AnalysisDeclContext | ( | ) |
Definition at line 425 of file AnalysisDeclContext.cpp.
| void AnalysisDeclContext::dumpCFG | ( | bool | ShowColors | ) |
Definition at line 178 of file AnalysisDeclContext.cpp.
References clang::CFG::dump(), getASTContext(), and getCFG().
| bool clang::AnalysisDeclContext::getAddEHEdges | ( | ) | const [inline] |
getAddEHEdges - Return true iff we are adding exceptional 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 122 of file AnalysisContext.h.
References clang::CFG::BuildOptions::AddEHEdges.
Referenced by CheckFallThrough().
| bool clang::AnalysisDeclContext::getAddImplicitDtors | ( | ) | const [inline] |
Definition at line 126 of file AnalysisContext.h.
References clang::CFG::BuildOptions::AddImplicitDtors.
| bool clang::AnalysisDeclContext::getAddInitializers | ( | ) | const [inline] |
Definition at line 127 of file AnalysisContext.h.
References clang::CFG::BuildOptions::AddInitializers.
| T* clang::AnalysisDeclContext::getAnalysis | ( | ) | [inline] |
Return the specified analysis object, lazily running the analysis if necessary. Return NULL if the analysis could not run.
Definition at line 169 of file AnalysisContext.h.
References clang::serialized_diags::create(), and data().
Referenced by clang::ento::AnalysisManager::getAnalysis(), and clang::LocationContext::getAnalysis().
| ASTContext& clang::AnalysisDeclContext::getASTContext | ( | ) | [inline] |
Definition at line 106 of file AnalysisContext.h.
References clang::Decl::getASTContext().
Referenced by dumpCFG().
Definition at line 117 of file AnalysisDeclContext.cpp.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
| Stmt * AnalysisDeclContext::getBody | ( | ) | const |
Definition at line 77 of file AnalysisDeclContext.cpp.
Referenced by DiagnoseSwitchLabelsFallthrough(), getCFG(), getParentMap(), getPseudoConstantAnalysis(), and getUnoptimizedCFG().
| CFG * AnalysisDeclContext::getCFG | ( | ) |
Definition at line 127 of file AnalysisDeclContext.cpp.
References clang::CFG::buildCFG(), clang::Decl::getASTContext(), getBody(), getUnoptimizedCFG(), and clang::CFG::BuildOptions::PruneTriviallyFalseEdges.
Referenced by clang::DominatorTree::buildDominatorTree(), CheckFallThrough(), clang::LiveVariables::computeLiveness(), clang::PostOrderCFGView::create(), DiagnoseSwitchLabelsFallthrough(), dumpCFG(), clang::reachable_code::FindUnreachableCode(), clang::ento::AnalysisManager::getCFG(), clang::LocationContext::getCFG(), getCFGReachablityAnalysis(), getCFGStmtMap(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().
| CFG::BuildOptions& clang::AnalysisDeclContext::getCFGBuildOptions | ( | ) | [inline] |
Return the build options used to construct the CFG.
Definition at line 110 of file AnalysisContext.h.
Referenced by clang::reachable_code::FindUnreachableCode(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().
| const CFG::BuildOptions& clang::AnalysisDeclContext::getCFGBuildOptions | ( | ) | const [inline] |
Definition at line 114 of file AnalysisContext.h.
| CFGReverseBlockReachabilityAnalysis * AnalysisDeclContext::getCFGReachablityAnalysis | ( | ) |
Definition at line 166 of file AnalysisDeclContext.cpp.
References getCFG().
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
| CFGStmtMap * AnalysisDeclContext::getCFGStmtMap | ( | ) |
Definition at line 154 of file AnalysisDeclContext.cpp.
References clang::CFGStmtMap::Build(), getCFG(), and getParentMap().
| const Decl* clang::AnalysisDeclContext::getDecl | ( | ) | const [inline] |
Definition at line 107 of file AnalysisContext.h.
Referenced by clang::LocationContext::getDecl(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().
| ParentMap & AnalysisDeclContext::getParentMap | ( | ) |
Definition at line 182 of file AnalysisDeclContext.cpp.
References getBody().
Referenced by getCFGStmtMap(), clang::ento::AnalysisManager::getParentMap(), clang::LocationContext::getParentMap(), and shouldRemoveDeadBindings().
| PseudoConstantAnalysis * AnalysisDeclContext::getPseudoConstantAnalysis | ( | ) |
Definition at line 188 of file AnalysisDeclContext.cpp.
References getBody().
| std::pair< AnalysisDeclContext::referenced_decls_iterator, AnalysisDeclContext::referenced_decls_iterator > AnalysisDeclContext::getReferencedBlockVars | ( | const BlockDecl * | BD | ) |
Definition at line 404 of file AnalysisDeclContext.cpp.
References LazyInitializeReferencedDecls().
| const ImplicitParamDecl * AnalysisDeclContext::getSelfDecl | ( | ) | const |
Return the ImplicitParamDecl* associated with 'self' if this AnalysisDeclContext wraps an ObjCMethodDecl. Returns NULL otherwise.
Definition at line 91 of file AnalysisDeclContext.cpp.
References clang::NamedDecl::getName(), and NULL.
Referenced by clang::LocationContext::getSelfDecl(), and isSelfVar().
| const StackFrameContext * AnalysisDeclContext::getStackFrame | ( | LocationContext const * | Parent, |
| const Stmt * | S, | ||
| const CFGBlock * | Blk, | ||
| unsigned | Idx | ||
| ) |
Definition at line 202 of file AnalysisDeclContext.cpp.
References clang::LocationContextManager::getStackFrame().
| CFG * AnalysisDeclContext::getUnoptimizedCFG | ( | ) |
Return a version of the CFG without any edges pruned.
Definition at line 141 of file AnalysisDeclContext.cpp.
References clang::CFG::buildCFG(), clang::Decl::getASTContext(), getBody(), and clang::CFG::BuildOptions::PruneTriviallyFalseEdges.
Referenced by getCFG().
| bool clang::AnalysisDeclContext::getUseUnoptimizedCFG | ( | ) | const [inline] |
Definition at line 123 of file AnalysisContext.h.
References clang::CFG::BuildOptions::PruneTriviallyFalseEdges.
| bool clang::AnalysisDeclContext::isCFGBuilt | ( | ) | const [inline] |
Returns true if we have built a CFG for this analysis context. Note that this doesn't correspond to whether or not a valid CFG exists, it corresponds to whether we *attempted* to build one.
Definition at line 147 of file AnalysisContext.h.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
| void AnalysisDeclContext::registerForcedBlockExpression | ( | const Stmt * | stmt | ) |
Definition at line 107 of file AnalysisDeclContext.cpp.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().