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);
166 const IteratorPosition &Pos);
168 const MemRegion *Cont,
const Stmt *S,
170 unsigned blockCount);
#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
const IteratorPosition * getIteratorPosition(ProgramStateRef State, SVal Val)
bool isIterator(const CXXRecordDecl *CRD)
bool isInsertCall(const FunctionDecl *Func)
bool isIteratorType(const QualType &Type)
ProgramStateRef createIteratorPosition(ProgramStateRef State, SVal Val, const MemRegion *Cont, const Stmt *S, const LocationContext *LCtx, unsigned blockCount)
bool isAccessOperator(OverloadedOperatorKind OK)
bool isEmplaceCall(const FunctionDecl *Func)
CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, IteratorPosition) IteratorSymbolMapTy
bool isEraseAfterCall(const FunctionDecl *Func)
ProgramStateRef assumeNoOverflow(ProgramStateRef State, SymbolRef Sym, long Scale)
CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, IteratorPosition) IteratorRegionMapTy
bool isRandomIncrOrDecrOperator(OverloadedOperatorKind OK)
ProgramStateRef advancePosition(ProgramStateRef State, SVal Iter, OverloadedOperatorKind Op, SVal Distance)
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)
ProgramStateRef setIteratorPosition(ProgramStateRef State, SVal Val, const IteratorPosition &Pos)
bool isDereferenceOperator(OverloadedOperatorKind OK)
bool isIncrementOperator(OverloadedOperatorKind OK)
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef
const SymExpr * SymbolRef
The JSON file list parser is used to communicate input to InstallAPI.
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