clang  7.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
 
AnalysisDeclContextgetAnalysisDeclContext () const
 
const LocationContextgetParent () const
 
bool isParentOf (const LocationContext *LC) const
 
const DeclgetDecl () const
 
CFGgetCFG () const
 
template<typename T >
TgetAnalysis () const
 
ParentMapgetParentMap () const
 
const ImplicitParamDeclgetSelfDecl () const
 
const StackFrameContextgetCurrentStackFrame () 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)
 

Detailed Description

Definition at line 221 of file AnalysisDeclContext.h.

Member Enumeration Documentation

◆ ContextKind

Enumerator
StackFrame 
Scope 
Block 

Definition at line 223 of file AnalysisDeclContext.h.

Constructor & Destructor Documentation

◆ LocationContext()

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

Definition at line 235 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 521 of file AnalysisDeclContext.cpp.

◆ getAnalysis()

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

Definition at line 255 of file AnalysisDeclContext.h.

References clang::T.

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

◆ getAnalysisDeclContext()

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

◆ getCFG()

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

◆ getCurrentStackFrame()

const StackFrameContext * LocationContext::getCurrentStackFrame ( ) const

◆ getDecl()

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

◆ 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

◆ inTopFrame()

bool LocationContext::inTopFrame ( ) const
virtual

Return true if the current LocationContext has no caller context.

Reimplemented in clang::StackFrameContext.

Definition at line 455 of file AnalysisDeclContext.cpp.

Referenced by clang::ento::MemRegionManager::getCXXThisRegion(), and clang::ento::CheckerContext::inTopFrame().

◆ isParentOf()

bool LocationContext::isParentOf ( const LocationContext LC) const

◆ 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 354 of file AnalysisDeclContext.cpp.


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