clang 22.0.0git
FieldConsumer Struct Reference

Helper struct for collecting smart owning pointer field regions. More...

Public Member Functions

 FieldConsumer (const MemRegion *Reg, CheckerContext &C, llvm::SmallPtrSetImpl< const MemRegion * > &Out)
void consume (const FieldDecl *FD)
std::optional< FieldConsumerswitchToBase (const CXXRecordDecl *BaseDecl, bool IsVirtual)

Public Attributes

const MemRegionReg
CheckerContextC
llvm::SmallPtrSetImpl< const MemRegion * > * Out

Detailed Description

Helper struct for collecting smart owning pointer field regions.

This allows both hasSmartPtrField and collectSmartPtrFieldRegions to share the same traversal logic, ensuring consistency.

Definition at line 3159 of file MallocChecker.cpp.

Constructor & Destructor Documentation

◆ FieldConsumer()

FieldConsumer::FieldConsumer ( const MemRegion * Reg,
CheckerContext & C,
llvm::SmallPtrSetImpl< const MemRegion * > & Out )
inline

Definition at line 3164 of file MallocChecker.cpp.

References C, Out, and Reg.

Referenced by switchToBase().

Member Function Documentation

◆ consume()

void FieldConsumer::consume ( const FieldDecl * FD)
inline

Definition at line 3168 of file MallocChecker.cpp.

References C, clang::ento::SVal::getAsRegion(), Out, and Reg.

◆ switchToBase()

std::optional< FieldConsumer > FieldConsumer::switchToBase ( const CXXRecordDecl * BaseDecl,
bool IsVirtual )
inline

Definition at line 3174 of file MallocChecker.cpp.

References C, FieldConsumer(), clang::ento::SVal::getAsRegion(), Out, and Reg.

Member Data Documentation

◆ C

CheckerContext* FieldConsumer::C

Definition at line 3161 of file MallocChecker.cpp.

Referenced by consume(), FieldConsumer(), and switchToBase().

◆ Out

llvm::SmallPtrSetImpl<const MemRegion *>* FieldConsumer::Out

Definition at line 3162 of file MallocChecker.cpp.

Referenced by consume(), FieldConsumer(), and switchToBase().

◆ Reg

const MemRegion* FieldConsumer::Reg

Definition at line 3160 of file MallocChecker.cpp.

Referenced by consume(), FieldConsumer(), and switchToBase().


The documentation for this struct was generated from the following file: