clang 19.0.0git
Public Member Functions | Friends | List of all members
clang::ento::CallEventManager Class Reference

Manages the lifetime of CallEvent objects. More...

#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"

Public Member Functions

 CallEventManager (llvm::BumpPtrAllocator &alloc)
 
CallEventRef getCaller (const StackFrameContext *CalleeCtx, ProgramStateRef State)
 Gets an outside caller given a callee context.
 
CallEventRef getCall (const Stmt *S, ProgramStateRef State, const LocationContext *LC, CFGBlock::ConstCFGElementRef ElemRef)
 Gets a call event for a function call, Objective-C method call, a 'new', or a 'delete' call.
 
CallEventRef getSimpleCall (const CallExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< ObjCMethodCallgetObjCMethodCall (const ObjCMessageExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< CXXConstructorCallgetCXXConstructorCall (const CXXConstructExpr *E, const MemRegion *Target, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< CXXInheritedConstructorCallgetCXXInheritedConstructorCall (const CXXInheritedCtorInitExpr *E, const MemRegion *Target, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< CXXDestructorCallgetCXXDestructorCall (const CXXDestructorDecl *DD, const Stmt *Trigger, const MemRegion *Target, bool IsBase, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< CXXAllocatorCallgetCXXAllocatorCall (const CXXNewExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 
CallEventRef< CXXDeallocatorCallgetCXXDeallocatorCall (const CXXDeleteExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
 

Friends

class CallEvent
 

Detailed Description

Manages the lifetime of CallEvent objects.

CallEventManager provides a way to create arbitrary CallEvents "on the stack" as if they were value objects by keeping a cache of CallEvent-sized memory blocks. The CallEvents created by CallEventManager are only valid for the lifetime of the OwnedCallEvent that holds them; right now these objects cannot be copied and ownership cannot be transferred.

Definition at line 1356 of file CallEvent.h.

Constructor & Destructor Documentation

◆ CallEventManager()

clang::ento::CallEventManager::CallEventManager ( llvm::BumpPtrAllocator &  alloc)
inline

Definition at line 1410 of file CallEvent.h.

Member Function Documentation

◆ getCall()

CallEventRef CallEventManager::getCall ( const Stmt S,
ProgramStateRef  State,
const LocationContext LC,
CFGBlock::ConstCFGElementRef  ElemRef 
)

Gets a call event for a function call, Objective-C method call, a 'new', or a 'delete' call.

Definition at line 1485 of file CallEvent.cpp.

References getCXXAllocatorCall(), getCXXDeallocatorCall(), getObjCMethodCall(), and getSimpleCall().

Referenced by generateDiagnosticsForCallLike(), and getCaller().

◆ getCaller()

CallEventRef CallEventManager::getCaller ( const StackFrameContext CalleeCtx,
ProgramStateRef  State 
)

◆ getCXXAllocatorCall()

CallEventRef< CXXAllocatorCall > clang::ento::CallEventManager::getCXXAllocatorCall ( const CXXNewExpr E,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

◆ getCXXConstructorCall()

CallEventRef< CXXConstructorCall > clang::ento::CallEventManager::getCXXConstructorCall ( const CXXConstructExpr E,
const MemRegion Target,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

◆ getCXXDeallocatorCall()

CallEventRef< CXXDeallocatorCall > clang::ento::CallEventManager::getCXXDeallocatorCall ( const CXXDeleteExpr E,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

Definition at line 1465 of file CallEvent.h.

Referenced by getCall(), and clang::ento::ExprEngine::VisitCXXDeleteExpr().

◆ getCXXDestructorCall()

CallEventRef< CXXDestructorCall > clang::ento::CallEventManager::getCXXDestructorCall ( const CXXDestructorDecl DD,
const Stmt Trigger,
const MemRegion Target,
bool  IsBase,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

Definition at line 1449 of file CallEvent.h.

Referenced by getCaller(), and clang::ento::ExprEngine::VisitCXXDestructor().

◆ getCXXInheritedConstructorCall()

CallEventRef< CXXInheritedConstructorCall > clang::ento::CallEventManager::getCXXInheritedConstructorCall ( const CXXInheritedCtorInitExpr E,
const MemRegion Target,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

Definition at line 1441 of file CallEvent.h.

Referenced by getCaller().

◆ getObjCMethodCall()

CallEventRef< ObjCMethodCall > clang::ento::CallEventManager::getObjCMethodCall ( const ObjCMessageExpr E,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)
inline

◆ getSimpleCall()

CallEventRef CallEventManager::getSimpleCall ( const CallExpr E,
ProgramStateRef  State,
const LocationContext LCtx,
CFGBlock::ConstCFGElementRef  ElemRef 
)

Friends And Related Function Documentation

◆ CallEvent

friend class CallEvent
friend

Definition at line 1357 of file CallEvent.h.


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