clang 22.0.0git
clang::ento::SymbolExtent Class Reference

SymbolExtent - Represents the extent (size in bytes) of a bounded region. More...

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

Inheritance diagram for clang::ento::SymbolExtent:
[legend]

Public Member Functions

LLVM_ATTRIBUTE_RETURNS_NONNULL const SubRegiongetRegion () const
QualType getType () const override
StringRef getKindStr () const override
 Get a string representation of the kind of the region.
void dumpToStream (raw_ostream &os) const override
void Profile (llvm::FoldingSetNodeID &profile) override
Public Member Functions inherited from clang::ento::SymbolData
 ~SymbolData () override=default
unsigned computeComplexity () const override
Public Member Functions inherited from clang::ento::SymExpr
virtual ~SymExpr ()=default
Kind getKind () const
SymbolID getSymbolID () const
 Get a unique identifier for this symbol.
virtual void dump () const
llvm::iterator_range< symbol_iteratorsymbols () const
virtual const MemRegiongetOriginRegion () const
 Find the region from which this symbol originates.

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &profile, const SubRegion *R)
static bool classof (const SymExpr *SE)
static constexpr bool classof (Kind K)
Static Public Member Functions inherited from clang::ento::SymbolData
static bool classof (const SymExpr *SE)
static constexpr bool classof (Kind K)

Static Public Attributes

static constexpr Kind ClassKind = SymbolExtentKind

Friends

class SymExprAllocator

Additional Inherited Members

Public Types inherited from clang::ento::SymExpr
enum  Kind
Protected Member Functions inherited from clang::ento::SymbolData
 SymbolData (Kind k, SymbolID sym)
Protected Member Functions inherited from clang::ento::SymExpr
 SymExpr (Kind k, SymbolID Sym)
Static Protected Member Functions inherited from clang::ento::SymExpr
static bool isValidTypeForSymbol (QualType T)
Protected Attributes inherited from clang::ento::SymExpr
unsigned Complexity = 0

Detailed Description

SymbolExtent - Represents the extent (size in bytes) of a bounded region.

Clients should not ask the SymbolManager for a region's extent. Always use SubRegion::getExtent instead – the value returned may not be a symbol.

Definition at line 183 of file SymbolManager.h.

Member Function Documentation

◆ classof() [1/2]

bool clang::ento::SymbolExtent::classof ( const SymExpr * SE)
inlinestatic

Definition at line 213 of file SymbolManager.h.

References classof(), and clang::ento::SymExpr::getKind().

Referenced by classof().

◆ classof() [2/2]

constexpr bool clang::ento::SymbolExtent::classof ( Kind K)
inlinestaticconstexpr

Definition at line 214 of file SymbolManager.h.

References ClassKind.

◆ dumpToStream()

void SymbolExtent::dumpToStream ( raw_ostream & os) const
overridevirtual

Reimplemented from clang::ento::SymExpr.

Definition at line 136 of file SymbolManager.cpp.

References getKindStr(), getRegion(), and clang::ento::SymExpr::getSymbolID().

◆ getKindStr()

StringRef SymbolExtent::getKindStr ( ) const
overridevirtual

Get a string representation of the kind of the region.

Implements clang::ento::SymbolData.

Definition at line 36 of file SymbolManager.cpp.

Referenced by dumpToStream().

◆ getRegion()

LLVM_ATTRIBUTE_RETURNS_NONNULL const SubRegion * clang::ento::SymbolExtent::getRegion ( ) const
inline

Definition at line 194 of file SymbolManager.h.

Referenced by dumpToStream(), and clang::ento::SValExplainer::VisitSymbolExtent().

◆ getType()

QualType SymbolExtent::getType ( ) const
overridevirtual

Implements clang::ento::SymExpr.

Definition at line 213 of file SymbolManager.cpp.

References clang::ASTContext::getSizeType().

◆ Profile() [1/2]

void clang::ento::SymbolExtent::Profile ( llvm::FoldingSetNodeID & profile)
inlineoverridevirtual

Implements clang::ento::SymExpr.

Definition at line 207 of file SymbolManager.h.

References Profile().

◆ Profile() [2/2]

void clang::ento::SymbolExtent::Profile ( llvm::FoldingSetNodeID & profile,
const SubRegion * R )
inlinestatic

Definition at line 202 of file SymbolManager.h.

References ClassKind.

Referenced by Profile().

◆ SymExprAllocator

friend class SymExprAllocator
friend

Definition at line 186 of file SymbolManager.h.

References ClassKind, clang::ento::SymbolData::SymbolData(), and SymExprAllocator.

Referenced by SymExprAllocator.

Member Data Documentation

◆ ClassKind

Kind clang::ento::SymbolExtent::ClassKind = SymbolExtentKind
staticconstexpr

Definition at line 212 of file SymbolManager.h.

Referenced by classof(), Profile(), and SymExprAllocator.


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