clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::ento::SymbolMetadata Class Reference

SymbolMetadata - Represents path-dependent metadata about a specific region. More...

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

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

Public Member Functions

 SymbolMetadata (SymbolID sym, const MemRegion *r, const Stmt *s, QualType t, const LocationContext *LCtx, unsigned count, const void *tag)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL const MemRegiongetRegion () const
 
LLVM_ATTRIBUTE_RETURNS_NONNULL const StmtgetStmt () const
 
LLVM_ATTRIBUTE_RETURNS_NONNULL const LocationContextgetLocationContext () const
 
unsigned getCount () const
 
LLVM_ATTRIBUTE_RETURNS_NONNULL const void * getTag () 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
 
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 MemRegion *R, const Stmt *S, QualType T, const LocationContext *LCtx, unsigned Count, const void *Tag)
 
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

SymbolMetadata - Represents path-dependent metadata about a specific region.

Metadata symbols remain live as long as they are marked as in use before dead-symbol sweeping AND their associated regions are still alive. Intended for use by checkers.

Definition at line 216 of file SymbolManager.h.

Constructor & Destructor Documentation

◆ SymbolMetadata()

clang::ento::SymbolMetadata::SymbolMetadata ( SymbolID  sym,
const MemRegion r,
const Stmt s,
QualType  t,
const LocationContext LCtx,
unsigned  count,
const void *  tag 
)
inline

Definition at line 225 of file SymbolManager.h.

References clang::ento::SymExpr::isValidTypeForSymbol(), s, and clang::T.

Member Function Documentation

◆ classof()

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

Definition at line 273 of file SymbolManager.h.

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

◆ dumpToStream()

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

Reimplemented from clang::ento::SymExpr.

Definition at line 101 of file SymbolManager.cpp.

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

◆ getCount()

unsigned clang::ento::SymbolMetadata::getCount ( ) const
inline

Definition at line 245 of file SymbolManager.h.

◆ getKindStr()

StringRef SymbolMetadata::getKindStr ( ) const
overridevirtual

Get a string representation of the kind of the region.

Implements clang::ento::SymbolData.

Definition at line 41 of file SymbolManager.cpp.

Referenced by dumpToStream().

◆ getLocationContext()

LLVM_ATTRIBUTE_RETURNS_NONNULL const LocationContext * clang::ento::SymbolMetadata::getLocationContext ( ) const
inline

Definition at line 243 of file SymbolManager.h.

◆ getRegion()

LLVM_ATTRIBUTE_RETURNS_NONNULL const MemRegion * clang::ento::SymbolMetadata::getRegion ( ) const
inline

Definition at line 237 of file SymbolManager.h.

Referenced by dumpToStream().

◆ getStmt()

LLVM_ATTRIBUTE_RETURNS_NONNULL const Stmt * clang::ento::SymbolMetadata::getStmt ( ) const
inline

Definition at line 240 of file SymbolManager.h.

◆ getTag()

LLVM_ATTRIBUTE_RETURNS_NONNULL const void * clang::ento::SymbolMetadata::getTag ( ) const
inline

Definition at line 248 of file SymbolManager.h.

◆ getType()

QualType SymbolMetadata::getType ( ) const
overridevirtual

Implements clang::ento::SymExpr.

Definition at line 341 of file SymbolManager.cpp.

References clang::T.

◆ Profile() [1/2]

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

Implements clang::ento::SymExpr.

Definition at line 268 of file SymbolManager.h.

References Profile(), and clang::T.

◆ Profile() [2/2]

static void clang::ento::SymbolMetadata::Profile ( llvm::FoldingSetNodeID &  profile,
const MemRegion R,
const Stmt S,
QualType  T,
const LocationContext LCtx,
unsigned  Count,
const void *  Tag 
)
inlinestatic

Definition at line 256 of file SymbolManager.h.

References clang::T.

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


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