clang
9.0.0
|
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. More... | |
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 |
Implemented in clang::ento::SymSymExpr, clang::ento::IntSymExpr, clang::ento::SymIntExpr, clang::ento::SymbolCast, and clang::ento::SymbolData.
Referenced by clang::ento::SymbolCast::computeComplexity(), clang::ento::SymIntExpr::computeComplexity(), clang::ento::IntSymExpr::computeComplexity(), clang::ento::SymSymExpr::computeComplexity(), clang::ento::SValBuilder::makeSymExprValNN(), and symbol_end().
|
virtual |
Definition at line 37 of file SymbolManager.cpp.
References dumpToStream().
Referenced by getKind().
|
inlinevirtual |
Reimplemented in clang::ento::SymSymExpr, clang::ento::IntSymExpr, clang::ento::SymIntExpr, clang::ento::SymbolCast, clang::ento::SymbolMetadata, clang::ento::SymbolExtent, clang::ento::SymbolDerived, clang::ento::SymbolConjured, and clang::ento::SymbolRegionValue.
Definition at line 60 of file SymExpr.h.
References getType(), and Profile().
Referenced by dump(), clang::ento::operator<<(), and clang::ento::SValExplainer::VisitSymExpr().
|
inline |
Definition at line 56 of file SymExpr.h.
References dump().
Referenced by clang::ento::SymbolRegionValue::classof(), clang::ento::SymbolConjured::classof(), clang::ento::SymbolData::classof(), clang::ento::SymbolDerived::classof(), clang::ento::SymbolExtent::classof(), clang::ento::SymbolMetadata::classof(), clang::ento::SymbolCast::classof(), clang::ento::BinarySymExpr::classof(), clang::ento::SymIntExpr::classof(), clang::ento::IntSymExpr::classof(), and clang::ento::SymSymExpr::classof().
|
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.
Reimplemented in clang::ento::SymbolDerived, and clang::ento::SymbolRegionValue.
Definition at line 101 of file SymExpr.h.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt().
|
pure virtual |
Implemented in clang::ento::BinarySymExpr, clang::ento::SymbolCast, clang::ento::SymbolMetadata, clang::ento::SymbolExtent, clang::ento::SymbolDerived, clang::ento::SymbolConjured, and clang::ento::SymbolRegionValue.
Referenced by clang::ento::RangedConstraintManager::assumeSymInclusiveRange(), clang::ento::RangedConstraintManager::assumeSymRel(), clang::ento::RangedConstraintManager::assumeSymUnsupported(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::ento::StoreManager::CastRetrievedVal(), clang::ento::ConstraintManager::checkNull(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::ento::CreateRangeConstraintManager(), dumpToStream(), clang::ento::SymbolRegionValue::dumpToStream(), clang::ento::retaincountchecker::RetainCountChecker::errorKindToBugKind(), clang::ento::getDynamicTypeInfo(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SymbolManager::getType(), clang::ento::SValBuilder::haveSameType(), clang::ento::SValBuilder::makeSymbolVal(), clang::ento::nonloc::SymbolVal::SymbolVal(), 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(), and clang::ento::SymbolRegionValue::SymbolRegionValue().
|
pure virtual |
|
inline |
Definition at line 86 of file SymExpr.h.
References clang::ento::SymExpr::symbol_iterator::symbol_iterator().
Referenced by clang::ento::ScanReachableSymbols::scan(), and clang::ento::SVal::symbol_begin().
|
inlinestatic |
Definition at line 87 of file SymExpr.h.
References computeComplexity(), and clang::ento::SymExpr::symbol_iterator::symbol_iterator().
Referenced by 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::SymIntExpr::computeComplexity(), clang::ento::IntSymExpr::computeComplexity(), and clang::ento::SymSymExpr::computeComplexity().