13#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ITERATOR_H
14#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_ITERATOR_H
39 : Cont(
C), Valid(
V), Offset(Of) {}
63 return Cont ==
X.Cont && Valid ==
X.Valid && Offset ==
X.Offset;
99 return Begin ==
X.Begin && End ==
X.End;
126 static void *
GDMIndex() {
static int Index;
return &Index; }
132 static void *
GDMIndex() {
static int Index;
return &Index; }
138 static void *
GDMIndex() {
static int Index;
return &Index; }
163 const MemRegion *Cont);
167 const IteratorPosition &Pos);
169 const MemRegion *Cont,
const Stmt* S,
171 unsigned blockCount);
175 const SVal &Distance);
#define CLANG_ENTO_PROGRAMSTATE_MAP(Key, Value)
Helper for registering a map trait.
Represents a C++ struct/union/class.
Represents a function declaration or definition.
It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...
A (possibly-)qualified type.
Stmt - This represents one statement.
The base class of the type hierarchy.
MemRegion - The root abstract class for all memory regions.
bool isEraseCall(const FunctionDecl *Func)
CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, ContainerData) ContainerMapTy
bool isIterator(const CXXRecordDecl *CRD)
bool isInsertCall(const FunctionDecl *Func)
bool isIteratorType(const QualType &Type)
bool isAccessOperator(OverloadedOperatorKind OK)
ProgramStateRef advancePosition(ProgramStateRef State, const SVal &Iter, OverloadedOperatorKind Op, const SVal &Distance)
bool isEmplaceCall(const FunctionDecl *Func)
CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, IteratorPosition) IteratorSymbolMapTy
const IteratorPosition * getIteratorPosition(ProgramStateRef State, const SVal &Val)
bool isEraseAfterCall(const FunctionDecl *Func)
ProgramStateRef assumeNoOverflow(ProgramStateRef State, SymbolRef Sym, long Scale)
ProgramStateRef setIteratorPosition(ProgramStateRef State, const SVal &Val, const IteratorPosition &Pos)
CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, IteratorPosition) IteratorRegionMapTy
bool isRandomIncrOrDecrOperator(OverloadedOperatorKind OK)
const ContainerData * getContainerData(ProgramStateRef State, const MemRegion *Cont)
bool compare(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2, BinaryOperator::Opcode Opc)
bool isDecrementOperator(OverloadedOperatorKind OK)
bool isComparisonOperator(OverloadedOperatorKind OK)
bool isDereferenceOperator(OverloadedOperatorKind OK)
bool isIncrementOperator(OverloadedOperatorKind OK)
ProgramStateRef createIteratorPosition(ProgramStateRef State, const SVal &Val, const MemRegion *Cont, const Stmt *S, const LocationContext *LCtx, unsigned blockCount)
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef
const SymExpr * SymbolRef
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
ContainerData newEnd(SymbolRef E) const
SymbolRef getBegin() const
static ContainerData fromEnd(SymbolRef E)
ContainerData newBegin(SymbolRef B) const
bool operator==(const ContainerData &X) const
void Profile(llvm::FoldingSetNodeID &ID) const
bool operator!=(const ContainerData &X) const
static ContainerData fromBegin(SymbolRef B)
IteratorPosition reAssign(const MemRegion *NewCont) const
bool operator!=(const IteratorPosition &X) const
IteratorPosition setTo(SymbolRef NewOf) const
bool operator==(const IteratorPosition &X) const
SymbolRef getOffset() const
const MemRegion * getContainer() const
static IteratorPosition getPosition(const MemRegion *C, SymbolRef Of)
void Profile(llvm::FoldingSetNodeID &ID) const
IteratorPosition invalidate() const