clang 17.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 |
symbol_iterator | symbol_begin () const |
virtual unsigned | computeComplexity () const =0 |
virtual const MemRegion * | getOriginRegion () const |
Find the region from which this symbol originates. | |
Static Public Member Functions | |
static symbol_iterator | symbol_end () |
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 60 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 56 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 102 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 45 of file SymExpr.h.
References clang::QualType::isNull(), and clang::Type::isVoidType().
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 86 of file SymExpr.h.
Referenced by clang::ento::taint::getTaintedSymbolsImpl(), clang::ento::ScanReachableSymbols::scan(), and clang::ento::SVal::symbol_begin().
|
inlinestatic |
Definition at line 87 of file SymExpr.h.
Referenced by clang::ento::taint::getTaintedSymbolsImpl(), clang::ento::ScanReachableSymbols::scan(), and clang::ento::SVal::symbol_end().
|
mutableprotected |
Definition at line 51 of file SymExpr.h.
Referenced by clang::ento::SymbolCast::computeComplexity(), clang::ento::UnarySymExpr::computeComplexity(), and clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::computeComplexity().