clang 20.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::StackFrameContext Class Reference

It represents a stack frame of the call stack (based on CallEvent). More...

#include "clang/Analysis/AnalysisDeclContext.h"

Inheritance diagram for clang::StackFrameContext:
Inheritance graph
[legend]

Public Member Functions

 ~StackFrameContext () override=default
 
const StmtgetCallSite () const
 
const CFGBlockgetCallSiteBlock () const
 
bool inTopFrame () const override
 
unsigned getIndex () const
 
CFGElement getCallSiteCFGElement () const
 
void Profile (llvm::FoldingSetNodeID &ID) override
 
- Public Member Functions inherited from clang::LocationContext
virtual ~LocationContext ()
 
ContextKind getKind () const
 
int64_t getID () const
 
LLVM_ATTRIBUTE_RETURNS_NONNULL AnalysisDeclContextgetAnalysisDeclContext () const
 
const LocationContextgetParent () const
 It might return null.
 
bool isParentOf (const LocationContext *LC) const
 
const DeclgetDecl () const
 
CFGgetCFG () const
 
template<typename T >
TgetAnalysis () const
 
const ParentMapgetParentMap () const
 
const ImplicitParamDeclgetSelfDecl () const
 
const StackFrameContextgetStackFrame () const
 
virtual bool inTopFrame () const
 
virtual void Profile (llvm::FoldingSetNodeID &ID)=0
 
LLVM_DUMP_METHOD void dumpStack (raw_ostream &Out) const
 Prints out the call stack.
 
void printJson (raw_ostream &Out, const char *NL="\n", unsigned int Space=0, bool IsDot=false, std::function< void(const LocationContext *)> printMoreInfoPerContext=[](const LocationContext *) {}) const
 Prints out the call stack in json format.
 
LLVM_DUMP_METHOD void dump () const
 

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &ID, AnalysisDeclContext *ADC, const LocationContext *ParentLC, const Stmt *S, const CFGBlock *Block, unsigned BlockCount, unsigned Index)
 
static bool classof (const LocationContext *LC)
 
- Static Public Member Functions inherited from clang::LocationContext
static void ProfileCommon (llvm::FoldingSetNodeID &ID, ContextKind ck, AnalysisDeclContext *ctx, const LocationContext *parent, const void *data)
 

Friends

class LocationContextManager
 

Additional Inherited Members

- Public Types inherited from clang::LocationContext
enum  ContextKind { StackFrame , Block }
 
- Protected Member Functions inherited from clang::LocationContext
 LocationContext (ContextKind k, AnalysisDeclContext *ctx, const LocationContext *parent, int64_t ID)
 

Detailed Description

It represents a stack frame of the call stack (based on CallEvent).

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 299 of file AnalysisDeclContext.h.

Constructor & Destructor Documentation

◆ ~StackFrameContext()

clang::StackFrameContext::~StackFrameContext ( )
overridedefault

Member Function Documentation

◆ classof()

static bool clang::StackFrameContext::classof ( const LocationContext LC)
inlinestatic

◆ getCallSite()

const Stmt * clang::StackFrameContext::getCallSite ( ) const
inline

◆ getCallSiteBlock()

const CFGBlock * clang::StackFrameContext::getCallSiteBlock ( ) const
inline

◆ getCallSiteCFGElement()

CFGElement clang::StackFrameContext::getCallSiteCFGElement ( ) const
inline

Definition at line 333 of file AnalysisDeclContext.h.

References Block.

Referenced by clang::ento::CallEvent::getConstructionContext().

◆ getIndex()

unsigned clang::StackFrameContext::getIndex ( ) const
inline

◆ inTopFrame()

bool clang::StackFrameContext::inTopFrame ( ) const
inlineoverridevirtual
Returns
Whether the current LocationContext has no caller context.

Reimplemented from clang::LocationContext.

Definition at line 329 of file AnalysisDeclContext.h.

References clang::LocationContext::getParent().

Referenced by getCalleeNode(), clang::LocationContext::inTopFrame(), and clang::ento::ExprEngine::processEndOfFunction().

◆ Profile() [1/2]

void StackFrameContext::Profile ( llvm::FoldingSetNodeID &  ID)
overridevirtual

◆ Profile() [2/2]

static void clang::StackFrameContext::Profile ( llvm::FoldingSetNodeID &  ID,
AnalysisDeclContext ADC,
const LocationContext ParentLC,
const Stmt S,
const CFGBlock Block,
unsigned  BlockCount,
unsigned  Index 
)
inlinestatic

Friends And Related Function Documentation

◆ LocationContextManager

friend class LocationContextManager
friend

Definition at line 300 of file AnalysisDeclContext.h.


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