clang 22.0.0git
clang::ento::SymbolDerived Class Reference

A symbol representing the value of a MemRegion whose parent region has symbolic value. More...

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

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

Public Member Functions

LLVM_ATTRIBUTE_RETURNS_NONNULL SymbolRef getParentSymbol () const
LLVM_ATTRIBUTE_RETURNS_NONNULL const TypedValueRegiongetRegion () 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
const MemRegiongetOriginRegion () const override
 Find the region from which this symbol originates.
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

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &profile, SymbolRef parent, const TypedValueRegion *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 = SymbolDerivedKind

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

A symbol representing the value of a MemRegion whose parent region has symbolic value.

Definition at line 138 of file SymbolManager.h.

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 176 of file SymbolManager.h.

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

Referenced by classof().

◆ classof() [2/2]

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

Definition at line 177 of file SymbolManager.h.

References ClassKind.

◆ dumpToStream()

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

◆ getKindStr()

StringRef SymbolDerived::getKindStr ( ) const
overridevirtual

Get a string representation of the kind of the region.

Implements clang::ento::SymbolData.

Definition at line 35 of file SymbolManager.cpp.

Referenced by dumpToStream().

◆ getOriginRegion()

const MemRegion * clang::ento::SymbolDerived::getOriginRegion ( ) const
inlineoverridevirtual

Find the region from which this symbol originates.

Whenever the symbol was constructed to denote an unknown value of a certain memory region, return this region. This method allows checkers to make decisions depending on the origin of the symbol. Symbol classes for which the origin region is known include SymbolRegionValue which denotes the value of the region before the beginning of the analysis, and SymbolDerived which denotes the value of a certain memory region after its super region (a memory space or a larger record region) is default-bound with a certain symbol. It might return null.

Reimplemented from clang::ento::SymExpr.

Definition at line 161 of file SymbolManager.h.

References getRegion().

◆ getParentSymbol()

LLVM_ATTRIBUTE_RETURNS_NONNULL SymbolRef clang::ento::SymbolDerived::getParentSymbol ( ) const
inline

◆ getRegion()

LLVM_ATTRIBUTE_RETURNS_NONNULL const TypedValueRegion * clang::ento::SymbolDerived::getRegion ( ) const
inline

◆ getType()

QualType SymbolDerived::getType ( ) const
overridevirtual

Implements clang::ento::SymExpr.

Definition at line 209 of file SymbolManager.cpp.

◆ Profile() [1/2]

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

Implements clang::ento::SymExpr.

Definition at line 170 of file SymbolManager.h.

References Profile().

◆ Profile() [2/2]

void clang::ento::SymbolDerived::Profile ( llvm::FoldingSetNodeID & profile,
SymbolRef parent,
const TypedValueRegion * r )
inlinestatic

Definition at line 163 of file SymbolManager.h.

References ClassKind.

Referenced by Profile().

◆ SymExprAllocator

friend class SymExprAllocator
friend

Definition at line 142 of file SymbolManager.h.

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

Referenced by SymExprAllocator.

Member Data Documentation

◆ ClassKind

Kind clang::ento::SymbolDerived::ClassKind = SymbolDerivedKind
staticconstexpr

Definition at line 175 of file SymbolManager.h.

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


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