clang 8.0.0

Functions
IteratorComparison Namespace Reference

## Functions
bool | isIteratorType (const QualType &Type)
bool | isIterator (const CXXRecordDecl *CRD)
bool | isComparisonOperator (OverloadedOperatorKind OK)
bool | isBeginCall (const FunctionDecl *Func)
bool | isEndCall (const FunctionDecl *Func)
bool | isAssignCall (const FunctionDecl *Func)
bool | isClearCall (const FunctionDecl *Func)
bool | isPushBackCall (const FunctionDecl *Func)
bool | isEmplaceBackCall (const FunctionDecl *Func)
bool | isPopBackCall (const FunctionDecl *Func)
bool | isPushFrontCall (const FunctionDecl *Func)
bool | isEmplaceFrontCall (const FunctionDecl *Func)
bool | isPopFrontCall (const FunctionDecl *Func)
bool | isInsertCall (const FunctionDecl *Func)
bool | isEraseCall (const FunctionDecl *Func)
bool | isEraseAfterCall (const FunctionDecl *Func)
bool | isEmplaceCall (const FunctionDecl *Func)
bool | isAssignmentOperator (OverloadedOperatorKind OK)
bool | isSimpleComparisonOperator (OverloadedOperatorKind OK)
bool | isAccessOperator (OverloadedOperatorKind OK)
bool | isDereferenceOperator (OverloadedOperatorKind OK)
bool | isIncrementOperator (OverloadedOperatorKind OK)
bool | isDecrementOperator (OverloadedOperatorKind OK)
bool | isRandomIncrOrDecrOperator (OverloadedOperatorKind OK)
bool | hasSubscriptOperator (ProgramStateRef State, const MemRegion *Reg)
bool | frontModifiable (ProgramStateRef State, const MemRegion *Reg)
bool | backModifiable (ProgramStateRef State, const MemRegion *Reg)
BinaryOperator::Opcode | getOpcode (const SymExpr *SE)
const RegionOrSymbol | getRegionOrSymbol (const SVal &Val)
const ProgramStateRef | processComparison (ProgramStateRef State, RegionOrSymbol LVal, RegionOrSymbol RVal, bool Equal)
const ProgramStateRef | saveComparison (ProgramStateRef State, const SymExpr *Condition, const SVal &LVal, const SVal &RVal, bool Eq)
const IteratorComparison * | loadComparison (ProgramStateRef State, const SymExpr *Condition)
SymbolRef | getContainerBegin (ProgramStateRef State, const MemRegion *Cont)
SymbolRef | getContainerEnd (ProgramStateRef State, const MemRegion *Cont)
ProgramStateRef | createContainerBegin (ProgramStateRef State, const MemRegion *Cont, const SymbolRef Sym)
ProgramStateRef | createContainerEnd (ProgramStateRef State, const MemRegion *Cont, const SymbolRef Sym)
const IteratorPosition * | getIteratorPosition (ProgramStateRef State, const SVal &Val)
const IteratorPosition * | getIteratorPosition (ProgramStateRef State, RegionOrSymbol RegOrSym)
ProgramStateRef | setIteratorPosition (ProgramStateRef State, const SVal &Val, const IteratorPosition &Pos)
ProgramStateRef | setIteratorPosition (ProgramStateRef State, RegionOrSymbol RegOrSym, const IteratorPosition &Pos)
ProgramStateRef | removeIteratorPosition (ProgramStateRef State, const SVal &Val)
ProgramStateRef | adjustIteratorPosition (ProgramStateRef State, RegionOrSymbol RegOrSym, const IteratorPosition &Pos, bool Equal)
ProgramStateRef | relateIteratorPositions (ProgramStateRef State, const IteratorPosition &Pos1, const IteratorPosition &Pos2, bool Equal)
ProgramStateRef | invalidateAllIteratorPositions (ProgramStateRef State, const MemRegion *Cont)
ProgramStateRef | invalidateAllIteratorPositionsExcept (ProgramStateRef State, const MemRegion *Cont, SymbolRef Offset, BinaryOperator::Opcode Opc)
ProgramStateRef | invalidateIteratorPositions (ProgramStateRef State, SymbolRef Offset, BinaryOperator::Opcode Opc)
ProgramStateRef | invalidateIteratorPositions (ProgramStateRef State, SymbolRef Offset1, BinaryOperator::Opcode Opc1, SymbolRef Offset2, BinaryOperator::Opcode Opc2)
ProgramStateRef | reassignAllIteratorPositions (ProgramStateRef State, const MemRegion *Cont, const MemRegion *NewCont)
ProgramStateRef | reassignAllIteratorPositionsUnless (ProgramStateRef State, const MemRegion *Cont, const MemRegion *NewCont, SymbolRef Offset, BinaryOperator::Opcode Opc)
ProgramStateRef | rebaseSymbolInIteratorPositionsIf (ProgramStateRef State, SValBuilder &SVB, SymbolRef OldSym, SymbolRef NewSym, SymbolRef CondSym, BinaryOperator::Opcode Opc)
const ContainerData * | getContainerData (ProgramStateRef State, const MemRegion *Cont)
ProgramStateRef | setContainerData (ProgramStateRef State, const MemRegion *Cont, const ContainerData &CData)
bool | hasLiveIterators (ProgramStateRef State, const MemRegion *Cont)
bool | isBoundThroughLazyCompoundVal (const Environment &Env, const MemRegion *Reg)
bool | isPastTheEnd (ProgramStateRef State, const IteratorPosition &Pos)
bool | isAheadOfRange (ProgramStateRef State, const IteratorPosition &Pos)
bool | isBehindPastTheEnd (ProgramStateRef State, const IteratorPosition &Pos)
bool | isZero (ProgramStateRef State, const NonLoc &Val)

## Function Documentation

## ◆ adjustIteratorPosition()

ProgramStateRef IteratorComparison::adjustIteratorPosition | ( | ProgramStateRef | State,
|  | RegionOrSymbol | RegOrSym,
|  | const IteratorPosition & | Pos,
|  | bool | Equal
| ) |  |

## ◆ backModifiable()

bool IteratorComparison::backModifiable | ( | ProgramStateRef | State,
|  | const MemRegion * | Reg
| ) |  |

Referenced by assumeNoOverflow().

## ◆ createContainerBegin()

ProgramStateRef IteratorComparison::createContainerBegin | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | const SymbolRef | Sym
| ) |  |

Referenced by assumeNoOverflow().

## ◆ createContainerEnd()

ProgramStateRef IteratorComparison::createContainerEnd | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | const SymbolRef | Sym
| ) |  |

Referenced by assumeNoOverflow().

## ◆ frontModifiable()

bool IteratorComparison::frontModifiable | ( | ProgramStateRef | State,
|  | const MemRegion * | Reg
| ) |  |

Referenced by assumeNoOverflow().

## ◆ getContainerBegin()

SymbolRef IteratorComparison::getContainerBegin | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont
| ) |  |

Referenced by assumeNoOverflow().

## ◆ getContainerData()

const ContainerData* IteratorComparison::getContainerData | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont
| ) |  |

Referenced by assumeNoOverflow().

## ◆ getContainerEnd()

SymbolRef IteratorComparison::getContainerEnd | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont
| ) |  |

Referenced by assumeNoOverflow().

## ◆ getIteratorPosition() [1/2]

const IteratorPosition* IteratorComparison::getIteratorPosition | ( | ProgramStateRef | State,
|  | const SVal & | Val
| ) |  |

## ◆ getIteratorPosition() [2/2]

const IteratorPosition* IteratorComparison::getIteratorPosition | ( | ProgramStateRef | State,
|  | RegionOrSymbol | RegOrSym
| ) |  |

Referenced by assumeNoOverflow().

## ◆ getOpcode()

BinaryOperator::Opcode IteratorComparison::getOpcode | ( | const SymExpr * | SE | ) |

Referenced by clang::Sema::CheckAddressOfOperand(), ClassifyInternal(), clang::Sema::DiscardMisalignedMemberAddress(), clang::ento::SymIntExpr::dumpToStream(), clang::ento::IntSymExpr::dumpToStream(), clang::ento::SymSymExpr::dumpToStream(), clang::OverloadExpr::find(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::isAdditiveOp(), clang::UnaryOperator::isArithmeticOp(), clang::BinaryOperator::isAssignmentOp(), clang::BinaryOperator::isBitwiseOp(), clang::BinaryOperator::isComparisonOp(), clang::BinaryOperator::isCompoundAssignmentOp(), clang::UnaryOperator::isDecrementOp(), clang::BinaryOperator::isEqualityOp(), clang::UnaryOperator::isIncrementDecrementOp(), clang::UnaryOperator::isIncrementOp(), clang::BinaryOperator::isLogicalOp(), clang::BinaryOperator::isMultiplicativeOp(), clang::UnaryOperator::isPostfix(), clang::UnaryOperator::isPrefix(), clang::BinaryOperator::isPtrMemOp(), clang::BinaryOperator::isRelationalOp(), clang::BinaryOperator::isShiftAssignOp(), clang::BinaryOperator::isShiftOp(), IsStandardConversion(), clang::ento::SymIntExpr::Profile(), clang::ento::IntSymExpr::Profile(), and clang::ento::SymSymExpr::Profile().

## ◆ getRegionOrSymbol()

const RegionOrSymbol IteratorComparison::getRegionOrSymbol | ( | const SVal & | Val | ) |

## ◆ hasLiveIterators()

bool IteratorComparison::hasLiveIterators | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont
| ) |  |

## ◆ hasSubscriptOperator()

bool IteratorComparison::hasSubscriptOperator | ( | ProgramStateRef | State,
|  | const MemRegion * | Reg
| ) |  |

Referenced by assumeNoOverflow().

## ◆ invalidateAllIteratorPositions()

ProgramStateRef IteratorComparison::invalidateAllIteratorPositions | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont
| ) |  |

Referenced by assumeNoOverflow().

## ◆ invalidateAllIteratorPositionsExcept()

ProgramStateRef IteratorComparison::invalidateAllIteratorPositionsExcept | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | SymbolRef | Offset,
|  | BinaryOperator::Opcode | Opc
| ) |  |

Referenced by assumeNoOverflow().

## ◆ invalidateIteratorPositions() [1/2]

ProgramStateRef IteratorComparison::invalidateIteratorPositions | ( | ProgramStateRef | State,
|  | SymbolRef | Offset,
|  | BinaryOperator::Opcode | Opc
| ) |  |

## ◆ invalidateIteratorPositions() [2/2]

ProgramStateRef IteratorComparison::invalidateIteratorPositions | ( | ProgramStateRef | State,
|  | SymbolRef | Offset1,
|  | BinaryOperator::Opcode | Opc1,
|  | SymbolRef | Offset2,
|  | BinaryOperator::Opcode | Opc2
| ) |  |

Referenced by assumeNoOverflow().

## ◆ isAccessOperator()

bool IteratorComparison::isAccessOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isAheadOfRange()

bool IteratorComparison::isAheadOfRange | ( | ProgramStateRef | State,
|  | const IteratorPosition & | Pos
| ) |  |

Referenced by assumeNoOverflow().

## ◆ isAssignCall()

bool IteratorComparison::isAssignCall | ( | const FunctionDecl * | Func | ) |

## ◆ isAssignmentOperator()

bool IteratorComparison::isAssignmentOperator | ( | OverloadedOperatorKind | OK | ) |

Referenced by clang::ento::changeIntBoundNode().

## ◆ isBeginCall()

bool IteratorComparison::isBeginCall | ( | const FunctionDecl * | Func | ) |

## ◆ isBehindPastTheEnd()

bool IteratorComparison::isBehindPastTheEnd | ( | ProgramStateRef | State,
|  | const IteratorPosition & | Pos
| ) |  |

Referenced by assumeNoOverflow().

## ◆ isBoundThroughLazyCompoundVal()

bool IteratorComparison::isBoundThroughLazyCompoundVal | ( | const Environment & | Env,
|  | const MemRegion * | Reg
| ) |  |

## ◆ isClearCall()

bool IteratorComparison::isClearCall | ( | const FunctionDecl * | Func | ) |

## ◆ isComparisonOperator()

bool IteratorComparison::isComparisonOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isDecrementOperator()

bool IteratorComparison::isDecrementOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isDereferenceOperator()

bool IteratorComparison::isDereferenceOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isEmplaceBackCall()

bool IteratorComparison::isEmplaceBackCall | ( | const FunctionDecl * | Func | ) |

## ◆ isEmplaceCall()

bool IteratorComparison::isEmplaceCall | ( | const FunctionDecl * | Func | ) |

## ◆ isEmplaceFrontCall()

bool IteratorComparison::isEmplaceFrontCall | ( | const FunctionDecl * | Func | ) |

## ◆ isEndCall()

bool IteratorComparison::isEndCall | ( | const FunctionDecl * | Func | ) |

## ◆ isEraseAfterCall()

bool IteratorComparison::isEraseAfterCall | ( | const FunctionDecl * | Func | ) |

## ◆ isEraseCall()

bool IteratorComparison::isEraseCall | ( | const FunctionDecl * | Func | ) |

## ◆ isIncrementOperator()

bool IteratorComparison::isIncrementOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isInsertCall()

bool IteratorComparison::isInsertCall | ( | const FunctionDecl * | Func | ) |

## ◆ isIterator()

bool IteratorComparison::isIterator | ( | const CXXRecordDecl * | CRD | ) |

Referenced by assumeNoOverflow(), clang::IdentifierResolver::iterator::getIterator(), clang::IdentifierResolver::iterator::operator*(), and clang::IdentifierResolver::iterator::operator++().

## ◆ isIteratorType()

bool IteratorComparison::isIteratorType | ( | const QualType & | Type | ) |

Referenced by assumeNoOverflow().

## ◆ isPastTheEnd()

bool IteratorComparison::isPastTheEnd | ( | ProgramStateRef | State,
|  | const IteratorPosition & | Pos
| ) |  |

## ◆ isPopBackCall()

bool IteratorComparison::isPopBackCall | ( | const FunctionDecl * | Func | ) |

## ◆ isPopFrontCall()

bool IteratorComparison::isPopFrontCall | ( | const FunctionDecl * | Func | ) |

## ◆ isPushBackCall()

bool IteratorComparison::isPushBackCall | ( | const FunctionDecl * | Func | ) |

## ◆ isPushFrontCall()

bool IteratorComparison::isPushFrontCall | ( | const FunctionDecl * | Func | ) |

## ◆ isRandomIncrOrDecrOperator()

bool IteratorComparison::isRandomIncrOrDecrOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isSimpleComparisonOperator()

bool IteratorComparison::isSimpleComparisonOperator | ( | OverloadedOperatorKind | OK | ) |

## ◆ isZero()

bool IteratorComparison::isZero | ( | ProgramStateRef | State,
|  | const NonLoc & | Val
| ) |  |

Referenced by assumeNoOverflow(), and emitArraySubscriptGEP().

## ◆ loadComparison()

const IteratorComparison* IteratorComparison::loadComparison | ( | ProgramStateRef | State,
|  | const SymExpr * | Condition
| ) |  |

## ◆ processComparison()

const ProgramStateRef IteratorComparison::processComparison | ( | ProgramStateRef | State,
|  | RegionOrSymbol | LVal,
|  | RegionOrSymbol | RVal,
|  | bool | Equal
| ) |  |

## ◆ reassignAllIteratorPositions()

ProgramStateRef IteratorComparison::reassignAllIteratorPositions | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | const MemRegion * | NewCont
| ) |  |

Referenced by assumeNoOverflow().

## ◆ reassignAllIteratorPositionsUnless()

ProgramStateRef IteratorComparison::reassignAllIteratorPositionsUnless | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | const MemRegion * | NewCont,
|  | SymbolRef | Offset,
|  | BinaryOperator::Opcode | Opc
| ) |  |

Referenced by assumeNoOverflow().

## ◆ rebaseSymbolInIteratorPositionsIf()

ProgramStateRef IteratorComparison::rebaseSymbolInIteratorPositionsIf | ( | ProgramStateRef | State,
|  | SValBuilder & | SVB,
|  | SymbolRef | OldSym,
|  | SymbolRef | NewSym,
|  | SymbolRef | CondSym,
|  | BinaryOperator::Opcode | Opc
| ) |  |

Referenced by assumeNoOverflow().

## ◆ relateIteratorPositions()

ProgramStateRef IteratorComparison::relateIteratorPositions | ( | ProgramStateRef | State,
|  | const IteratorPosition & | Pos1,
|  | const IteratorPosition & | Pos2,
|  | bool | Equal
| ) |  |

## ◆ removeIteratorPosition()

ProgramStateRef IteratorComparison::removeIteratorPosition | ( | ProgramStateRef | State,
|  | const SVal & | Val
| ) |  |

## ◆ saveComparison()

const ProgramStateRef IteratorComparison::saveComparison | ( | ProgramStateRef | State,
|  | const SymExpr * | Condition,
|  | const SVal & | LVal,
|  | const SVal & | RVal,
|  | bool | Eq
| ) |  |

## ◆ setContainerData()

ProgramStateRef IteratorComparison::setContainerData | ( | ProgramStateRef | State,
|  | const MemRegion * | Cont,
|  | const ContainerData & | CData
| ) |  |

Referenced by assumeNoOverflow().

## ◆ setIteratorPosition() [1/2]

ProgramStateRef IteratorComparison::setIteratorPosition | ( | ProgramStateRef | State,
|  | const SVal & | Val,
|  | const IteratorPosition & | Pos
| ) |  |

## ◆ setIteratorPosition() [2/2]

ProgramStateRef IteratorComparison::setIteratorPosition | ( | ProgramStateRef | State,
|  | RegionOrSymbol | RegOrSym,
|  | const IteratorPosition & | Pos
| ) |  |

Referenced by assumeNoOverflow().