Lines Matching defs:Sym
233 // See if Sym is known to be a relation Rel with Bound.
234 static bool isInRelation(BinaryOperator::Opcode Rel, SymbolRef Sym,
238 SVal Result = SVB.evalBinOpNN(State, Rel, nonloc::SymbolVal(Sym),
247 // See if Sym is known to be within [min/4, max/4], where min and max
252 static bool isWithinConstantOverflowBounds(SymbolRef Sym,
257 QualType T = Sym->getType();
263 return isInRelation(BO_LE, Sym, Max, State) &&
264 isInRelation(BO_GE, Sym, Min, State);
277 static std::pair<SymbolRef, APSIntPtr> decomposeSymbol(SymbolRef Sym,
279 if (const auto *SymInt = dyn_cast<SymIntExpr>(Sym))
287 return std::make_pair(Sym, BV.getValue(0, Sym->getType()));
361 SymbolRef Sym, llvm::APSInt Int, QualType Ty) {
362 return Sym->getType() == Ty &&
364 (isWithinConstantOverflowBounds(Sym, State) &&
610 SymbolRef Sym = lhs.castAs<nonloc::SymbolVal>().getSymbol();
613 if (const SymIntExpr *symIntExpr = dyn_cast<SymIntExpr>(Sym)) {
711 return MakeSymIntVal(Sym, op, *RHSValue, resultTy);
1205 if (SymbolRef Sym = V.getAsSymbol())
1206 return state->getConstraintManager().getSymVal(state, Sym);
1233 if (SymbolRef Sym = V.getAsSymbol())
1234 return state->getConstraintManager().getSymMinVal(state, Sym);
1246 if (SymbolRef Sym = V.getAsSymbol())
1247 return state->getConstraintManager().getSymMaxVal(state, Sym);
1280 static bool isUnchanged(SymbolRef Sym, SVal Val) {
1281 return Sym == Val.getAsSymbol();
1284 SVal cache(SymbolRef Sym, SVal V) {
1285 Cached[Sym] = V;
1289 SVal skip(SymbolRef Sym) {
1290 return cache(Sym, SVB.makeSymbolVal(Sym));
1293 // Return the known const value for the Sym if available, or return Undef
1295 SVal getConst(SymbolRef Sym) {
1297 State->getConstraintManager().getSymVal(State, Sym);
1299 return Loc::isLocType(Sym->getType()) ? (SVal)SVB.makeIntLocVal(*Const)
1304 SVal getConstOrVisit(SymbolRef Sym) {
1305 const SVal Ret = getConst(Sym);
1307 return Visit(Sym);
1343 if (SymbolRef Sym = LHS.getAsSymbol()) {
1344 assert(Loc::isLocType(Sym->getType()));
1345 LHS = SVB.makeLoc(Sym);