clang 10.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 | isDereferenceOperator (OverloadedOperatorKind OK)
bool | isIncrementOperator (OverloadedOperatorKind OK)
bool | isDecrementOperator (OverloadedOperatorKind OK)
bool | isRandomIncrOrDecrOperator (OverloadedOperatorKind OK)
const ContainerData * | getContainerData (ProgramStateRef State, const MemRegion *Cont)
const IteratorPosition * | getIteratorPosition (ProgramStateRef State, const SVal &Val)
ProgramStateRef | setIteratorPosition (ProgramStateRef State, const SVal &Val, const IteratorPosition &Pos)
ProgramStateRef | advancePosition (ProgramStateRef State, const SVal &Iter, OverloadedOperatorKind Op, const SVal &Distance)
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

using clang::ento::iterator::ContainerMapTy = typedef CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, ContainerData)

Definition at line 120 of file Iterator.h.

## ◆ IteratorRegionMapTy

using clang::ento::iterator::IteratorRegionMapTy = typedef CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, IteratorPosition)

Definition at line 119 of file Iterator.h.

## ◆ IteratorSymbolMapTy

using clang::ento::iterator::IteratorSymbolMapTy = typedef CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, IteratorPosition)

Definition at line 118 of file Iterator.h.

## Function Documentation

## ◆ advancePosition()

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

Definition at line 180 of file Iterator.cpp.

References clang::ento::SVal::getAs(), getIteratorPosition(), and setIteratorPosition().

## ◆ compare() [1/2]

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

Definition at line 207 of file Iterator.cpp.

## ◆ compare() [2/2]

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

Definition at line 212 of file Iterator.cpp.

## ◆ getContainerData()

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

Definition at line 149 of file Iterator.cpp.

## ◆ getIteratorPosition()

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

Definition at line 154 of file Iterator.cpp.

References clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), and clang::ento::SVal::getAsSymbol().

Referenced by advancePosition().

## ◆ isAccessOperator()

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

Definition at line 126 of file Iterator.cpp.

References isDecrementOperator(), isDereferenceOperator(), isIncrementOperator(), and isRandomIncrOrDecrOperator().

## ◆ isComparisonOperator()

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

Definition at line 71 of file Iterator.cpp.

## ◆ isDecrementOperator()

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

Definition at line 140 of file Iterator.cpp.

Referenced by isAccessOperator().

## ◆ isDereferenceOperator()

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

Definition at line 131 of file Iterator.cpp.

Referenced by isAccessOperator().

## ◆ isEmplaceCall()

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

Definition at line 87 of file Iterator.cpp.

References clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), and isIteratorType().

## ◆ isEraseAfterCall()

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

Definition at line 112 of file Iterator.cpp.

References clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), and isIteratorType().

## ◆ isEraseCall()

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

Definition at line 98 of file Iterator.cpp.

References clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), and isIteratorType().

## ◆ isIncrementOperator()

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

Definition at line 136 of file Iterator.cpp.

Referenced by isAccessOperator().

## ◆ isInsertCall()

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

Definition at line 76 of file Iterator.cpp.

References clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), and isIteratorType().

## ◆ isIterator()

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

Definition at line 27 of file Iterator.cpp.

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

## ◆ isIteratorType()

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

Definition at line 19 of file Iterator.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::Type::getUnqualifiedDesugaredType(), isIterator(), and clang::Type::isPointerType().

Referenced by isEmplaceCall(), isEraseAfterCall(), isEraseCall(), and isInsertCall().

## ◆ isRandomIncrOrDecrOperator()

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

Definition at line 144 of file Iterator.cpp.

Referenced by isAccessOperator().

## ◆ setIteratorPosition()

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

Definition at line 167 of file Iterator.cpp.

References clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), and clang::ento::SVal::getAsSymbol().

Referenced by advancePosition().