clang API Documentation
#include <AnalysisContext.h>
Public Types | |
enum | ContextKind { StackFrame, Scope, Block } |
Public Member Functions | |
virtual | ~LocationContext () |
ContextKind | getKind () const |
AnalysisDeclContext * | getAnalysisDeclContext () const |
const LocationContext * | getParent () const |
bool | isParentOf (const LocationContext *LC) const |
const Decl * | getDecl () const |
CFG * | getCFG () const |
template<typename T > | |
T * | getAnalysis () const |
ParentMap & | getParentMap () const |
const ImplicitParamDecl * | getSelfDecl () const |
const StackFrameContext * | getCurrentStackFrame () const |
virtual bool | inTopFrame () const |
Return true if the current LocationContext has no caller context. | |
virtual void | Profile (llvm::FoldingSetNodeID &ID)=0 |
void | dumpStack (raw_ostream &OS, StringRef Indent="") const |
void | dumpStack () const |
Static Public Member Functions | |
static void | ProfileCommon (llvm::FoldingSetNodeID &ID, ContextKind ck, AnalysisDeclContext *ctx, const LocationContext *parent, const void *data) |
Protected Member Functions | |
LocationContext (ContextKind k, AnalysisDeclContext *ctx, const LocationContext *parent) |
Definition at line 210 of file AnalysisContext.h.
Definition at line 212 of file AnalysisContext.h.
clang::LocationContext::LocationContext | ( | ContextKind | k, |
AnalysisDeclContext * | ctx, | ||
const LocationContext * | parent | ||
) | [inline, protected] |
Definition at line 224 of file AnalysisContext.h.
LocationContext::~LocationContext | ( | ) | [virtual] |
Definition at line 571 of file AnalysisDeclContext.cpp.
void LocationContext::dumpStack | ( | raw_ostream & | OS, |
StringRef | Indent = "" |
||
) | const |
Definition at line 430 of file AnalysisDeclContext.cpp.
References Block, getAnalysisDeclContext(), clang::AnalysisDeclContext::getASTContext(), getDecl(), clang::ASTContext::getLangOpts(), getParent(), clang::Decl::print(), StackFrame, and clang::PrintingPolicy::TerseOutput.
Referenced by clang::ento::PrettyStackTraceLocationContext::print().
LLVM_DUMP_METHOD void LocationContext::dumpStack | ( | ) | const |
Definition at line 455 of file AnalysisDeclContext.cpp.
T* clang::LocationContext::getAnalysis | ( | ) | const [inline] |
Definition at line 244 of file AnalysisContext.h.
References clang::AnalysisDeclContext::getAnalysis(), and getAnalysisDeclContext().
Referenced by clang::ento::ExplodedNode::getAnalysis().
AnalysisDeclContext* clang::LocationContext::getAnalysisDeclContext | ( | ) | const [inline] |
Definition at line 233 of file AnalysisContext.h.
Referenced by clang::ento::SValBuilder::conjureSymbolVal(), dumpStack(), getAnalysis(), clang::ento::SValBuilder::getBlockPointer(), getCFG(), clang::ento::CheckerContext::getCurrentAnalysisDeclContext(), getDecl(), clang::ObjCMethodCall::getInitialStackFrameContents(), getLocationForCaller(), getParentMap(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), getValidSourceLocation(), mayInlineCallKind(), clang::StackFrameContext::Profile(), clang::ScopeContext::Profile(), clang::BlockInvocationContext::Profile(), clang::ento::ExprEngine::removeDeadOnEndOfFunction(), shouldRemoveDeadBindings(), and wasSynthesizedProperty().
CFG* clang::LocationContext::getCFG | ( | ) | const [inline] |
Definition at line 241 of file AnalysisContext.h.
References getAnalysisDeclContext(), and clang::AnalysisDeclContext::getCFG().
Referenced by clang::ento::CoreEngine::ExecuteWorkList(), clang::ento::ExplodedNode::getCFG(), clang::ento::BugReport::getStmt(), and clang::ento::ExprEngine::processCallEnter().
const StackFrameContext * LocationContext::getCurrentStackFrame | ( | ) | const |
Definition at line 404 of file AnalysisDeclContext.cpp.
References getParent().
Referenced by clang::ento::NodeBuilderContext::blockCount(), clang::ento::MemRegionManager::getAllocaRegion(), GetAllocationSite(), clang::ento::MemRegionManager::getBlockDataRegion(), clang::CallEventManager::getCaller(), clang::ento::MemRegionManager::getCompoundLiteralRegion(), clang::ento::MemRegionManager::getCXXTempObjectRegion(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::ExprEngine::getInitialState(), getLastStmt(), getRegionForConstructedObject(), clang::ento::ExplodedNode::getStackFrame(), inTopFrame(), isInitializationOfVar(), clang::ento::SymbolReaper::isLive(), mayInlineCallKind(), parameterTypeFromSVal(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessMemberDtor(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::removeDead(), reversePropagateInterestingSymbols(), and clang::ento::ExprEngine::VisitCXXConstructExpr().
const Decl* clang::LocationContext::getDecl | ( | ) | const [inline] |
Definition at line 239 of file AnalysisContext.h.
References getAnalysisDeclContext(), and clang::AnalysisDeclContext::getDecl().
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::ento::PathDiagnosticLocation::createDeclEnd(), dumpStack(), clang::ento::CoreEngine::ExecuteWorkList(), GenerateAlternateExtensivePathDiagnostic(), clang::CallEventManager::getCaller(), clang::ento::ExplodedNode::getCodeDecl(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath(), clang::ento::AnyFunctionCall::getInitialStackFrameContents(), clang::BlockCall::getInitialStackFrameContents(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CXXConstructorCall::getInitialStackFrameContents(), clang::ObjCMethodCall::getInitialStackFrameContents(), clang::ento::ExprEngine::getInitialState(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), getRegionForConstructedObject(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessMemberDtor(), reversePropagateInterestingSymbols(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::ento::ExprEngine::VisitCXXConstructExpr(), and wasDifferentDeclUsedForInlining().
ContextKind clang::LocationContext::getKind | ( | ) | const [inline] |
Definition at line 231 of file AnalysisContext.h.
Referenced by clang::StackFrameContext::classof(), clang::ScopeContext::classof(), and clang::BlockInvocationContext::classof().
const LocationContext* clang::LocationContext::getParent | ( | ) | const [inline] |
Definition at line 235 of file AnalysisContext.h.
Referenced by dumpStack(), clang::ento::CoreEngine::enqueueEndOfFunction(), clang::CallEventManager::getCaller(), getCurrentStackFrame(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath(), clang::ento::ExprEngine::getInitialState(), getStackOrCaptureRegionForDeclContext(), clang::StackFrameContext::inTopFrame(), isParentOf(), clang::ento::ExprEngine::processCallExit(), clang::StackFrameContext::Profile(), clang::ScopeContext::Profile(), clang::BlockInvocationContext::Profile(), and clang::ento::ExprEngine::removeDead().
ParentMap& clang::LocationContext::getParentMap | ( | ) | const [inline] |
Definition at line 248 of file AnalysisContext.h.
References getAnalysisDeclContext(), and clang::AnalysisDeclContext::getParentMap().
Referenced by clang::ento::ExplodedNode::getParentMap(), mayInlineCallKind(), and optimizeEdges().
const ImplicitParamDecl* clang::LocationContext::getSelfDecl | ( | ) | const [inline] |
Definition at line 252 of file AnalysisContext.h.
References clang::AnalysisDeclContext::getSelfDecl().
Referenced by clang::ObjCMethodCall::getSelfSVal().
bool LocationContext::inTopFrame | ( | ) | const [virtual] |
Return true if the current LocationContext has no caller context.
Reimplemented in clang::StackFrameContext.
Definition at line 414 of file AnalysisDeclContext.cpp.
References getCurrentStackFrame(), and clang::StackFrameContext::inTopFrame().
Referenced by clang::ento::CheckerContext::inTopFrame(), and clang::ento::ExprEngine::processEndOfFunction().
bool LocationContext::isParentOf | ( | const LocationContext * | LC | ) | const |
Definition at line 418 of file AnalysisDeclContext.cpp.
References getParent().
Referenced by clang::ento::SymbolReaper::isLive(), and clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode().
virtual void clang::LocationContext::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | [pure virtual] |
Implemented in clang::BlockInvocationContext, clang::ScopeContext, and clang::StackFrameContext.
void LocationContext::ProfileCommon | ( | llvm::FoldingSetNodeID & | ID, |
ContextKind | ck, | ||
AnalysisDeclContext * | ctx, | ||
const LocationContext * | parent, | ||
const void * | data | ||
) | [static] |
Definition at line 313 of file AnalysisDeclContext.cpp.
Referenced by clang::StackFrameContext::Profile(), clang::ScopeContext::Profile(), and clang::BlockInvocationContext::Profile().