Lines Matching refs:State

67 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos);
68 bool isAheadOfRange(ProgramStateRef State, const IteratorPosition &Pos);
69 bool isBehindPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos);
70 bool isZero(ProgramStateRef State, const NonLoc &Val);
149 ProgramStateRef State = C.getState(); in checkPreStmt() local
151 SVal SubVal = State->getSVal(UO->getSubExpr(), C.getLocationContext()); in checkPreStmt()
164 ProgramStateRef State = C.getState(); in checkPreStmt() local
166 SVal LVal = State->getSVal(BO->getLHS(), C.getLocationContext()); in checkPreStmt()
171 SVal RVal = State->getSVal(BO->getRHS(), C.getLocationContext()); in checkPreStmt()
181 ProgramStateRef State = C.getState(); in checkPreStmt() local
182 SVal LVal = State->getSVal(ASE->getLHS(), C.getLocationContext()); in checkPreStmt()
191 ProgramStateRef State = C.getState(); in checkPreStmt() local
192 SVal BaseVal = State->getSVal(ME->getBase(), C.getLocationContext()); in checkPreStmt()
198 auto State = C.getState(); in verifyDereference() local
199 const auto *Pos = getIteratorPosition(State, Val); in verifyDereference()
200 if (Pos && isPastTheEnd(State, *Pos)) { in verifyDereference()
201 auto *N = C.generateErrorNode(State); in verifyDereference()
224 auto State = C.getState(); in verifyRandomIncrOrDecr() local
228 Value = State->getRawSVal(*ValAsLoc); in verifyRandomIncrOrDecr()
235 if (isZero(State, Value.castAs<NonLoc>())) in verifyRandomIncrOrDecr()
240 auto StateAfter = advancePosition(State, LHS, Op, Value); in verifyRandomIncrOrDecr()
247 if (isAheadOfRange(State, *PosAfter)) { in verifyRandomIncrOrDecr()
248 auto *N = C.generateErrorNode(State); in verifyRandomIncrOrDecr()
254 if (isBehindPastTheEnd(State, *PosAfter)) { in verifyRandomIncrOrDecr()
255 auto *N = C.generateErrorNode(State); in verifyRandomIncrOrDecr()
294 bool isLess(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2);
295 bool isGreater(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2);
296 bool isEqual(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2);
298 bool isZero(ProgramStateRef State, const NonLoc &Val) { in isZero() argument
299 auto &BVF = State->getBasicVals(); in isZero()
300 return compare(State, Val, in isZero()
305 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos) { in isPastTheEnd() argument
307 const auto *CData = getContainerData(State, Cont); in isPastTheEnd()
313 if (isEqual(State, Pos.getOffset(), End)) { in isPastTheEnd()
321 bool isAheadOfRange(ProgramStateRef State, const IteratorPosition &Pos) { in isAheadOfRange() argument
323 const auto *CData = getContainerData(State, Cont); in isAheadOfRange()
329 if (isLess(State, Pos.getOffset(), Beg)) { in isAheadOfRange()
337 bool isBehindPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos) { in isBehindPastTheEnd() argument
339 const auto *CData = getContainerData(State, Cont); in isBehindPastTheEnd()
345 if (isGreater(State, Pos.getOffset(), End)) { in isBehindPastTheEnd()
353 bool isLess(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2) { in isLess() argument
354 return compare(State, Sym1, Sym2, BO_LT); in isLess()
357 bool isGreater(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2) { in isGreater() argument
358 return compare(State, Sym1, Sym2, BO_GT); in isGreater()
361 bool isEqual(ProgramStateRef State, SymbolRef Sym1, SymbolRef Sym2) { in isEqual() argument
362 return compare(State, Sym1, Sym2, BO_EQ); in isEqual()