clang 20.0.0git
|
Symbolic value. More...
#include "clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h"
Classes | |
class | symbol_iterator |
Iterator over symbols that the current symbol depends on. More... | |
Public Types | |
enum | Kind |
Public Member Functions | |
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_iterator > | symbols () const |
virtual unsigned | computeComplexity () const =0 |
virtual const MemRegion * | getOriginRegion () const |
Find the region from which this symbol originates. | |
Protected Member Functions | |
SymExpr (Kind k) | |
Static Protected Member Functions | |
static bool | isValidTypeForSymbol (QualType T) |
Protected Attributes | |
unsigned | Complexity = 0 |
Symbolic value.
These values used to capture symbolic execution of the program.
|
virtualdefault |
|
pure virtual |
|
virtual |
Definition at line 44 of file SymbolManager.cpp.
References dumpToStream().
|
inlinevirtual |
Reimplemented in clang::ento::SymbolRegionValue, clang::ento::SymbolConjured, clang::ento::SymbolDerived, clang::ento::SymbolExtent, clang::ento::SymbolMetadata, clang::ento::SymbolCast, clang::ento::UnarySymExpr, and clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >.
Definition at line 61 of file SymExpr.h.
Referenced by dump(), clang::ento::SymbolCast::dumpToStream(), clang::ento::UnarySymExpr::dumpToStream(), clang::ento::BinarySymExpr::dumpToStreamImpl(), clang::ento::operator<<(), and toString().
|
inline |
Definition at line 57 of file SymExpr.h.
Referenced by clang::ento::SymbolRegionValue::classof(), clang::ento::SymbolConjured::classof(), clang::ento::SymbolDerived::classof(), clang::ento::SymbolExtent::classof(), clang::ento::SymbolMetadata::classof(), clang::ento::SymbolCast::classof(), clang::ento::UnarySymExpr::classof(), clang::ento::BinarySymExpr::classof(), clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::classof(), clang::ento::SymbolData::classof(), and clang::ento::SymbolReaper::isLive().
|
inlinevirtual |
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 in clang::ento::SymbolRegionValue, and clang::ento::SymbolDerived.
Definition at line 104 of file SymExpr.h.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), getOriginParam(), and unwrapRValueReferenceIndirection().
|
pure virtual |
Implemented in clang::ento::SymbolRegionValue, clang::ento::SymbolConjured, clang::ento::SymbolDerived, clang::ento::SymbolExtent, clang::ento::SymbolMetadata, clang::ento::SymbolCast, clang::ento::UnarySymExpr, and clang::ento::BinarySymExpr.
Referenced by clang::ento::iterator::assumeNoOverflow(), clang::ento::RangedConstraintManager::assumeSymInclusiveRange(), clang::ento::RangedConstraintManager::assumeSymRel(), clang::ento::RangedConstraintManager::assumeSymUnsupported(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::ento::ConstraintManager::checkNull(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), decomposeSymbol(), doRearrangeUnchecked(), clang::ento::retaincountchecker::RetainCountChecker::errorKindToBugKind(), clang::ento::SMTConv::fromData(), generateDiagnosticsForCallLike(), clang::ento::retaincountchecker::RefLeakReportVisitor::getEndPath(), clang::ento::SymbolicRegion::getPointeeStaticType(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SymbolManager::getType(), isWithinConstantOverflowBounds(), clang::ento::SValBuilder::makeSymbolVal(), shouldRearrange(), clang::ento::nonloc::SymbolVal::SymbolVal(), tryRearrange(), unwrapRValueReferenceIndirection(), and clang::ento::SValExplainer::VisitSymbolicRegion().
Definition at line 46 of file SymExpr.h.
References clang::Type::isVoidType(), and clang::T.
Referenced by clang::ento::BinarySymExpr::BinarySymExpr(), clang::ento::SymbolCast::SymbolCast(), clang::ento::SymbolConjured::SymbolConjured(), clang::ento::SymbolDerived::SymbolDerived(), clang::ento::SymbolMetadata::SymbolMetadata(), clang::ento::SymbolRegionValue::SymbolRegionValue(), and clang::ento::UnarySymExpr::UnarySymExpr().
|
pure virtual |
|
inline |
Definition at line 87 of file SymExpr.h.
Referenced by clang::ento::taint::getTaintedSymbolsImpl(), and clang::ento::ScanReachableSymbols::scan().
|
mutableprotected |
Definition at line 52 of file SymExpr.h.
Referenced by clang::ento::SymbolCast::computeComplexity(), clang::ento::UnarySymExpr::computeComplexity(), and clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::computeComplexity().