clang  14.0.0git
Classes | Typedefs | Functions
clang::ento::iterator Namespace Reference

Classes

struct  ContainerData
 
class  ContainerMap
 
struct  IteratorPosition
 
class  IteratorRegionMap
 
class  IteratorSymbolMap
 

Typedefs

using IteratorSymbolMapTy = CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, IteratorPosition)
 
using IteratorRegionMapTy = CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, IteratorPosition)
 
using ContainerMapTy = CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, ContainerData)
 

Functions

bool isIteratorType (const QualType &Type)
 
bool isIterator (const CXXRecordDecl *CRD)
 
bool isComparisonOperator (OverloadedOperatorKind OK)
 
bool isInsertCall (const FunctionDecl *Func)
 
bool isEmplaceCall (const FunctionDecl *Func)
 
bool isEraseCall (const FunctionDecl *Func)
 
bool isEraseAfterCall (const FunctionDecl *Func)
 
bool isAccessOperator (OverloadedOperatorKind OK)
 
bool isAccessOperator (UnaryOperatorKind OK)
 
bool isAccessOperator (BinaryOperatorKind OK)
 
bool isDereferenceOperator (OverloadedOperatorKind OK)
 
bool isDereferenceOperator (UnaryOperatorKind OK)
 
bool isDereferenceOperator (BinaryOperatorKind OK)
 
bool isIncrementOperator (OverloadedOperatorKind OK)
 
bool isIncrementOperator (UnaryOperatorKind OK)
 
bool isDecrementOperator (OverloadedOperatorKind OK)
 
bool isDecrementOperator (UnaryOperatorKind OK)
 
bool isRandomIncrOrDecrOperator (OverloadedOperatorKind OK)
 
bool isRandomIncrOrDecrOperator (BinaryOperatorKind OK)
 
const ContainerDatagetContainerData (ProgramStateRef State, const MemRegion *Cont)
 
const IteratorPositiongetIteratorPosition (ProgramStateRef State, const SVal &Val)
 
ProgramStateRef setIteratorPosition (ProgramStateRef State, const SVal &Val, const IteratorPosition &Pos)
 
ProgramStateRef createIteratorPosition (ProgramStateRef State, const SVal &Val, const MemRegion *Cont, const Stmt *S, const LocationContext *LCtx, unsigned blockCount)
 
ProgramStateRef advancePosition (ProgramStateRef State, const SVal &Iter, OverloadedOperatorKind Op, const SVal &Distance)
 
ProgramStateRef assumeNoOverflow (ProgramStateRef State, SymbolRef Sym, long Scale)
 
bool compare (ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2, BinaryOperator::Opcode Opc)
 
bool compare (ProgramStateRef State, NonLoc NL1, NonLoc NL2, BinaryOperator::Opcode Opc)
 

Typedef Documentation

◆ ContainerMapTy

Definition at line 123 of file Iterator.h.

◆ IteratorRegionMapTy

Definition at line 121 of file Iterator.h.

◆ IteratorSymbolMapTy

Definition at line 119 of file Iterator.h.

Function Documentation

◆ advancePosition()

ProgramStateRef clang::ento::iterator::advancePosition ( ProgramStateRef  State,
const SVal Iter,
OverloadedOperatorKind  Op,
const SVal Distance 
)

◆ assumeNoOverflow()

ProgramStateRef clang::ento::iterator::assumeNoOverflow ( ProgramStateRef  State,
SymbolRef  Sym,
long  Scale 
)

◆ compare() [1/2]

bool clang::ento::iterator::compare ( ProgramStateRef  State,
NonLoc  NL1,
NonLoc  NL2,
BinaryOperator::Opcode  Opc 
)

Definition at line 304 of file Iterator.cpp.

References State.

◆ compare() [2/2]

bool clang::ento::iterator::compare ( ProgramStateRef  State,
SymbolRef  Sym1,
SymbolRef  Sym2,
BinaryOperator::Opcode  Opc 
)

Definition at line 299 of file Iterator.cpp.

References State.

◆ createIteratorPosition()

ProgramStateRef clang::ento::iterator::createIteratorPosition ( ProgramStateRef  State,
const SVal Val,
const MemRegion Cont,
const Stmt S,
const LocationContext LCtx,
unsigned  blockCount 
)

Definition at line 210 of file Iterator.cpp.

◆ getContainerData()

const ContainerData * clang::ento::iterator::getContainerData ( ProgramStateRef  State,
const MemRegion Cont 
)

Definition at line 179 of file Iterator.cpp.

References State.

◆ getIteratorPosition()

const IteratorPosition * clang::ento::iterator::getIteratorPosition ( ProgramStateRef  State,
const SVal Val 
)

◆ isAccessOperator() [1/3]

bool clang::ento::iterator::isAccessOperator ( BinaryOperatorKind  OK)

Definition at line 136 of file Iterator.cpp.

References isDereferenceOperator(), and isRandomIncrOrDecrOperator().

◆ isAccessOperator() [2/3]

bool clang::ento::iterator::isAccessOperator ( OverloadedOperatorKind  OK)

◆ isAccessOperator() [3/3]

bool clang::ento::iterator::isAccessOperator ( UnaryOperatorKind  OK)

◆ isComparisonOperator()

bool clang::ento::iterator::isComparisonOperator ( OverloadedOperatorKind  OK)

Definition at line 71 of file Iterator.cpp.

◆ isDecrementOperator() [1/2]

bool clang::ento::iterator::isDecrementOperator ( OverloadedOperatorKind  OK)

Definition at line 161 of file Iterator.cpp.

Referenced by isAccessOperator().

◆ isDecrementOperator() [2/2]

bool clang::ento::iterator::isDecrementOperator ( UnaryOperatorKind  OK)

Definition at line 165 of file Iterator.cpp.

◆ isDereferenceOperator() [1/3]

bool clang::ento::iterator::isDereferenceOperator ( BinaryOperatorKind  OK)

Definition at line 149 of file Iterator.cpp.

◆ isDereferenceOperator() [2/3]

bool clang::ento::iterator::isDereferenceOperator ( OverloadedOperatorKind  OK)

Definition at line 140 of file Iterator.cpp.

Referenced by isAccessOperator().

◆ isDereferenceOperator() [3/3]

bool clang::ento::iterator::isDereferenceOperator ( UnaryOperatorKind  OK)

Definition at line 145 of file Iterator.cpp.

◆ isEmplaceCall()

bool clang::ento::iterator::isEmplaceCall ( const FunctionDecl Func)

◆ isEraseAfterCall()

bool clang::ento::iterator::isEraseAfterCall ( const FunctionDecl Func)

◆ isEraseCall()

bool clang::ento::iterator::isEraseCall ( const FunctionDecl Func)

◆ isIncrementOperator() [1/2]

bool clang::ento::iterator::isIncrementOperator ( OverloadedOperatorKind  OK)

Definition at line 153 of file Iterator.cpp.

Referenced by isAccessOperator().

◆ isIncrementOperator() [2/2]

bool clang::ento::iterator::isIncrementOperator ( UnaryOperatorKind  OK)

Definition at line 157 of file Iterator.cpp.

◆ isInsertCall()

bool clang::ento::iterator::isInsertCall ( const FunctionDecl Func)

◆ isIterator()

bool clang::ento::iterator::isIterator ( const CXXRecordDecl CRD)

Definition at line 27 of file Iterator.cpp.

Referenced by isIteratorType().

◆ isIteratorType()

bool clang::ento::iterator::isIteratorType ( const QualType Type)

◆ isRandomIncrOrDecrOperator() [1/2]

bool clang::ento::iterator::isRandomIncrOrDecrOperator ( BinaryOperatorKind  OK)

Definition at line 174 of file Iterator.cpp.

◆ isRandomIncrOrDecrOperator() [2/2]

bool clang::ento::iterator::isRandomIncrOrDecrOperator ( OverloadedOperatorKind  OK)

Definition at line 169 of file Iterator.cpp.

Referenced by isAccessOperator().

◆ setIteratorPosition()

ProgramStateRef clang::ento::iterator::setIteratorPosition ( ProgramStateRef  State,
const SVal Val,
const IteratorPosition Pos 
)