clang 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::ento::SymbolRegionValue Class Reference

A symbol representing the value stored at a MemRegion. More...

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

Inheritance diagram for clang::ento::SymbolRegionValue:
Inheritance graph
[legend]

Public Member Functions

 SymbolRegionValue (SymbolID sym, const TypedValueRegion *r)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL const TypedValueRegiongetRegion () const
 
void Profile (llvm::FoldingSetNodeID &profile) 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.
 
QualType getType () const override
 
- Public Member Functions inherited from clang::ento::SymbolData
 ~SymbolData () override=default
 
virtual StringRef getKindStr () const =0
 Get a string representation of the kind of the region.
 
SymbolID getSymbolID () const
 
unsigned computeComplexity () const override
 
- Public Member Functions inherited from clang::ento::SymExpr
virtual ~SymExpr ()=default
 
Kind getKind () const
 
virtual void dump () const
 
virtual void dumpToStream (raw_ostream &os) const
 
virtual QualType getType () const =0
 
virtual void Profile (llvm::FoldingSetNodeID &profile)=0
 
llvm::iterator_range< symbol_iteratorsymbols () const
 
virtual unsigned computeComplexity () const =0
 
virtual const MemRegiongetOriginRegion () const
 Find the region from which this symbol originates.
 

Static Public Member Functions

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

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)
 
- 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 stored at a MemRegion.

Definition at line 42 of file SymbolManager.h.

Constructor & Destructor Documentation

◆ SymbolRegionValue()

clang::ento::SymbolRegionValue::SymbolRegionValue ( SymbolID  sym,
const TypedValueRegion r 
)
inline

Member Function Documentation

◆ classof()

static bool clang::ento::SymbolRegionValue::classof ( const SymExpr SE)
inlinestatic

Definition at line 72 of file SymbolManager.h.

References clang::ento::SymExpr::getKind().

◆ dumpToStream()

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

Reimplemented from clang::ento::SymExpr.

Definition at line 107 of file SymbolManager.cpp.

References getKindStr(), clang::ento::SymbolData::getSymbolID(), and getType().

◆ getKindStr()

StringRef SymbolRegionValue::getKindStr ( ) const
overridevirtual

Get a string representation of the kind of the region.

Implements clang::ento::SymbolData.

Definition at line 42 of file SymbolManager.cpp.

Referenced by dumpToStream().

◆ getOriginRegion()

const MemRegion * clang::ento::SymbolRegionValue::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 67 of file SymbolManager.h.

References getRegion().

◆ getRegion()

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

Definition at line 53 of file SymbolManager.h.

Referenced by getOriginRegion().

◆ getType()

QualType SymbolRegionValue::getType ( ) const
overridevirtual

Implements clang::ento::SymExpr.

Definition at line 345 of file SymbolManager.cpp.

Referenced by dumpToStream().

◆ Profile() [1/2]

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

Implements clang::ento::SymExpr.

Definition at line 60 of file SymbolManager.h.

References Profile().

◆ Profile() [2/2]

static void clang::ento::SymbolRegionValue::Profile ( llvm::FoldingSetNodeID &  profile,
const TypedValueRegion R 
)
inlinestatic

Definition at line 55 of file SymbolManager.h.

Referenced by clang::ento::SymbolManager::getRegionValueSymbol(), and Profile().


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