clang  8.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
clang::LocationContext Class Referenceabstract

#include "clang/Analysis/AnalysisDeclContext.h"

Inheritance diagram for clang::LocationContext:
Inheritance graph
[legend]
Collaboration diagram for clang::LocationContext:
Collaboration graph
[legend]

Public Types

enum  ContextKind { StackFrame, Scope, Block }
 

Public Member Functions

virtual ~LocationContext ()
 
ContextKind getKind () const
 
int64_t getID () const
 
AnalysisDeclContextgetAnalysisDeclContext () const
 
const LocationContextgetParent () const
 
bool isParentOf (const LocationContext *LC) const
 
const DeclgetDecl () const
 
CFGgetCFG () const
 
template<typename T >
T * getAnalysis () const
 
ParentMapgetParentMap () const
 
const ImplicitParamDeclgetSelfDecl () const
 
const StackFrameContextgetStackFrame () const
 
virtual bool inTopFrame () const
 Return true if the current LocationContext has no caller context. More...
 
virtual void Profile (llvm::FoldingSetNodeID &ID)=0
 
void dumpStack (raw_ostream &OS, StringRef Indent={}, const char *NL="\, const char *Sep="", std::function< void(const LocationContext *)> printMoreInfoPerContext=[](const LocationContext *) {}) 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, int64_t ID)
 

Detailed Description

Definition at line 218 of file AnalysisDeclContext.h.

Member Enumeration Documentation

◆ ContextKind

Enumerator
StackFrame 
Scope 
Block 

Definition at line 220 of file AnalysisDeclContext.h.

Constructor & Destructor Documentation

◆ LocationContext()

clang::LocationContext::LocationContext ( ContextKind  k,
AnalysisDeclContext ctx,
const LocationContext parent,
int64_t  ID 
)
inlineprotected

Definition at line 233 of file AnalysisDeclContext.h.

◆ ~LocationContext()

LocationContext::~LocationContext ( )
virtualdefault

Member Function Documentation

◆ dumpStack() [1/2]

void LocationContext::dumpStack ( raw_ostream &  OS,
StringRef  Indent = {},
const char *  NL = "\n",
const char *  Sep = "",
std::function< void(const LocationContext *)>  printMoreInfoPerContext = [](const LocationContext *) {} 
) const

◆ dumpStack() [2/2]

LLVM_DUMP_METHOD void LocationContext::dumpStack ( ) const

Definition at line 516 of file AnalysisDeclContext.cpp.

◆ getAnalysis()

template<typename T >
T* clang::LocationContext::getAnalysis ( ) const
inline

Definition at line 258 of file AnalysisDeclContext.h.

Referenced by clang::ento::ExplodedNode::getAnalysis().

◆ getAnalysisDeclContext()

AnalysisDeclContext* clang::LocationContext::getAnalysisDeclContext ( ) const
inline

◆ getCFG()

CFG* clang::LocationContext::getCFG ( ) const
inline

◆ getDecl()

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

Definition at line 253 of file AnalysisDeclContext.h.

Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkBeginFunction(), checkInvariantViolation(), checkSelfIvarsForInvariantViolation(), clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::ento::PathDiagnosticLocation::createDeclEnd(), clang::ento::CoreEngine::ExecuteWorkList(), clang::ento::CoreEngine::ExecuteWorkListWithInitialState(), generatePathDiagnosticForConsumer(), generatePathDiagnosticsForNode(), clang::CallEventManager::getCaller(), clang::ento::ExplodedNode::getCodeDecl(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::AnyFunctionCall::getInitialStackFrameContents(), clang::BlockCall::getInitialStackFrameContents(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CXXConstructorCall::getInitialStackFrameContents(), clang::ObjCMethodCall::getInitialStackFrameContents(), clang::ento::ExprEngine::getInitialState(), clang::ento::retaincountchecker::isSynthesizedAccessor(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessMemberDtor(), llvm::FoldingSetTrait< ObjectState >::Profile(), recordFixedType(), reversePropagateInterestingSymbols(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::ento::ExprEngine::VisitCXXConstructExpr(), wasDifferentDeclUsedForInlining(), and willObjectBeAnalyzedLater().

◆ getID()

int64_t clang::LocationContext::getID ( ) const
inline

Definition at line 243 of file AnalysisDeclContext.h.

◆ getKind()

ContextKind clang::LocationContext::getKind ( ) const
inline

◆ getParent()

const LocationContext* clang::LocationContext::getParent ( ) const
inline

◆ getParentMap()

ParentMap& clang::LocationContext::getParentMap ( ) const
inline

◆ getSelfDecl()

const ImplicitParamDecl* clang::LocationContext::getSelfDecl ( ) const
inline

◆ getStackFrame()

const StackFrameContext * LocationContext::getStackFrame ( ) const

Definition at line 440 of file AnalysisDeclContext.cpp.

References getParent().

Referenced by clang::ento::ExprEngine::bindReturnValue(), clang::ento::NodeBuilderContext::blockCount(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::CoreEngine::ExecuteWorkListWithInitialState(), clang::ento::MemRegionManager::getAllocaRegion(), getArgumentValueString(), 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(), clang::ento::ExprEngine::getObjectUnderConstruction(), clang::ProgramPoint::getStackFrame(), clang::ento::getWidenedLoopState(), isInitializationOfVar(), isRecordEmpty(), clang::ento::WorkList::makeBFSBlockDFSContents(), clang::ento::WorkList::makeUnexploredFirst(), parameterTypeFromSVal(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::processEndOfFunction(), clang::ento::ExprEngine::ProcessMemberDtor(), llvm::FoldingSetTrait< ObjectState >::Profile(), recordFixedType(), REGISTER_MAP_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::removeDead(), reversePropagateInterestingSymbols(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCXXConstructExpr(), and wasRegionOfInterestModifiedAt().

◆ inTopFrame()

bool LocationContext::inTopFrame ( ) const
virtual

◆ isParentOf()

bool LocationContext::isParentOf ( const LocationContext LC) const

Definition at line 454 of file AnalysisDeclContext.cpp.

References getParent(), and Parent.

Referenced by getAsPointeeSymbol(), and isReferenceCountingPointerDestructor().

◆ Profile()

virtual void clang::LocationContext::Profile ( llvm::FoldingSetNodeID &  ID)
pure virtual

◆ ProfileCommon()

void LocationContext::ProfileCommon ( llvm::FoldingSetNodeID &  ID,
ContextKind  ck,
AnalysisDeclContext ctx,
const LocationContext parent,
const void *  data 
)
static

Definition at line 349 of file AnalysisDeclContext.cpp.


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