clang 22.0.0git
FindStackRegionsSymbolVisitor Class Referencefinal

A visitor made for use with a ScanReachableSymbols scanner, used for finding stack regions within an SVal that live on the current stack frame of the given checker context. More...

Inheritance diagram for FindStackRegionsSymbolVisitor:
[legend]

Public Member Functions

 FindStackRegionsSymbolVisitor (CheckerContext &Ctxt, SmallVectorImpl< const MemRegion * > &StorageForStackRegions)
bool VisitSymbol (SymbolRef sym) override
 A visitor method invoked by ProgramStateManager::scanReachableSymbols.
bool VisitMemRegion (const MemRegion *MR) override
Public Member Functions inherited from clang::ento::SymbolVisitor
 SymbolVisitor ()=default
 SymbolVisitor (const SymbolVisitor &)=default
 SymbolVisitor (SymbolVisitor &&)
SymbolVisitoroperator= (const SymbolVisitor &)=delete
SymbolVisitoroperator= (SymbolVisitor &&)=delete

Additional Inherited Members

Protected Member Functions inherited from clang::ento::SymbolVisitor
 ~SymbolVisitor ()=default

Detailed Description

A visitor made for use with a ScanReachableSymbols scanner, used for finding stack regions within an SVal that live on the current stack frame of the given checker context.

This visitor excludes NonParamVarRegion that data is bound to in a BlockDataRegion's bindings, since these are likely uninteresting, e.g., in case a temporary is constructed on the stack, but it captures values that would leak.

Definition at line 246 of file StackAddrEscapeChecker.cpp.

Constructor & Destructor Documentation

◆ FindStackRegionsSymbolVisitor()

FindStackRegionsSymbolVisitor::FindStackRegionsSymbolVisitor ( CheckerContext & Ctxt,
SmallVectorImpl< const MemRegion * > & StorageForStackRegions )
inlineexplicit

Definition at line 252 of file StackAddrEscapeChecker.cpp.

Member Function Documentation

◆ VisitMemRegion()

bool FindStackRegionsSymbolVisitor::VisitMemRegion ( const MemRegion * MR)
inlineoverridevirtual

Reimplemented from clang::ento::SymbolVisitor.

Definition at line 260 of file StackAddrEscapeChecker.cpp.

References clang::ento::MemRegion::getAs().

◆ VisitSymbol()

bool FindStackRegionsSymbolVisitor::VisitSymbol ( SymbolRef sym)
inlineoverridevirtual

A visitor method invoked by ProgramStateManager::scanReachableSymbols.

The method returns true if symbols should continue be scanned and false otherwise.

Implements clang::ento::SymbolVisitor.

Definition at line 258 of file StackAddrEscapeChecker.cpp.


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