Lines Matching refs:RS

180   static RefState getAllocatedOfSizeZero(const RefState *RS) {  in getAllocatedOfSizeZero()  argument
181 return RefState(AllocatedOfSizeZero, RS->getStmt(), in getAllocatedOfSizeZero()
182 RS->getAllocationFamily()); in getAllocatedOfSizeZero()
190 static RefState getEscaped(const RefState *RS) { in getEscaped() argument
191 return RefState(Escaped, RS->getStmt(), RS->getAllocationFamily()); in getEscaped()
693 const Expr *DeallocExpr, const RefState *RS,
1543 const RefState *RS = State->get<RegionState>(Sym); in ProcessZeroAllocCheck() local
1544 if (RS) { in ProcessZeroAllocCheck()
1545 if (RS->isAllocated()) in ProcessZeroAllocCheck()
1547 RefState::getAllocatedOfSizeZero(RS)); in ProcessZeroAllocCheck()
2112 const RefState *RS = C.getState()->get<RegionState>(Sym); in getCheckIfTracked() local
2113 assert(RS); in getCheckIfTracked()
2114 return getCheckIfTracked(RS->getAllocationFamily(), IsALeakCheck); in getCheckIfTracked()
2285 const RefState *RS, SymbolRef Sym, in HandleMismatchedDealloc() argument
2302 const Expr *AllocExpr = cast<Expr>(RS->getStmt()); in HandleMismatchedDealloc()
2324 printExpectedDeallocName(os, RS->getAllocationFamily()); in HandleMismatchedDealloc()
2739 const RefState *RS = C.getState()->get<RegionState>(Sym); in HandleLeak() local
2740 assert(RS && "cannot leak an untracked symbol"); in HandleLeak()
2741 AllocationFamily Family = RS->getAllocationFamily(); in HandleLeak()
2804 RegionStateTy RS = OldRS; in checkDeadSymbols() local
2806 for (auto [Sym, State] : RS) { in checkDeadSymbols()
2811 RS = F.remove(RS, Sym); in checkDeadSymbols()
2815 if (RS == OldRS) { in checkDeadSymbols()
2852 C.addTransition(state->set<RegionState>(RS), N); in checkDeadSymbols()
2993 const RefState *RS = C.getState()->get<RegionState>(Sym); in isReleased() local
2994 return (RS && RS->isReleased()); in isReleased()
3019 if (const RefState *RS = State->get<RegionState>(Sym)) in suppressDeallocationsInSuspiciousContexts() local
3020 State = State->set<RegionState>(Sym, RefState::getEscaped(RS)); in suppressDeallocationsInSuspiciousContexts()
3041 if (const RefState *RS = C.getState()->get<RegionState>(Sym)) { in checkUseZeroAllocated() local
3042 if (RS->isAllocatedOfSizeZero()) in checkUseZeroAllocated()
3043 HandleUseZeroAlloc(C, RS->getStmt()->getSourceRange(), Sym); in checkUseZeroAllocated()
3074 RegionStateTy RS = state->get<RegionState>(); in evalAssume() local
3075 for (SymbolRef Sym : llvm::make_first_range(RS)) { in evalAssume()
3094 if (const RefState *RS = state->get<RegionState>(ReallocSym)) { in evalAssume() local
3095 if (RS->isReleased()) { in evalAssume()
3099 RefState::getAllocated(RS->getAllocationFamily(), RS->getStmt())); in evalAssume()
3296 static bool checkIfNewOrNewArrayFamily(const RefState *RS) { in checkIfNewOrNewArrayFamily() argument
3297 return (RS->getAllocationFamily() == AF_CXXNewArray || in checkIfNewOrNewArrayFamily()
3298 RS->getAllocationFamily() == AF_CXXNew); in checkIfNewOrNewArrayFamily()
3319 if (const RefState *RS = State->get<RegionState>(sym)) in checkPointerEscapeAux() local
3320 if (RS->isAllocated() || RS->isAllocatedOfSizeZero()) in checkPointerEscapeAux()
3321 if (!IsConstPointerEscape || checkIfNewOrNewArrayFamily(RS)) in checkPointerEscapeAux()
3322 State = State->set<RegionState>(sym, RefState::getEscaped(RS)); in checkPointerEscapeAux()
3559 RegionStateTy RS = State->get<RegionState>(); in printState() local
3561 if (!RS.isEmpty()) { in printState()
3563 for (auto [Sym, Data] : RS) { in printState()