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()
727 const Expr *DeallocExpr, const RefState *RS,
1517 const RefState *RS = State->get<RegionState>(Sym); in ProcessZeroAllocCheck() local
1518 if (RS) { in ProcessZeroAllocCheck()
1519 if (RS->isAllocated()) in ProcessZeroAllocCheck()
1521 RefState::getAllocatedOfSizeZero(RS)); in ProcessZeroAllocCheck()
2160 const RefState *RS = C.getState()->get<RegionState>(Sym); in getCheckIfTracked() local
2161 assert(RS); in getCheckIfTracked()
2162 return getCheckIfTracked(RS->getAllocationFamily(), IsALeakCheck); in getCheckIfTracked()
2333 const RefState *RS, SymbolRef Sym, in HandleMismatchedDealloc() argument
2350 const Expr *AllocExpr = cast<Expr>(RS->getStmt()); in HandleMismatchedDealloc()
2372 printExpectedDeallocName(os, RS->getAllocationFamily()); in HandleMismatchedDealloc()
2787 const RefState *RS = C.getState()->get<RegionState>(Sym); in HandleLeak() local
2788 assert(RS && "cannot leak an untracked symbol"); in HandleLeak()
2789 AllocationFamily Family = RS->getAllocationFamily(); in HandleLeak()
2852 RegionStateTy RS = OldRS; in checkDeadSymbols() local
2854 for (auto [Sym, State] : RS) { in checkDeadSymbols()
2859 RS = F.remove(RS, Sym); in checkDeadSymbols()
2863 if (RS == OldRS) { in checkDeadSymbols()
2900 C.addTransition(state->set<RegionState>(RS), N); in checkDeadSymbols()
3048 const RefState *RS = C.getState()->get<RegionState>(Sym); in isReleased() local
3049 return (RS && RS->isReleased()); in isReleased()
3074 if (const RefState *RS = State->get<RegionState>(Sym)) in suppressDeallocationsInSuspiciousContexts() local
3075 State = State->set<RegionState>(Sym, RefState::getEscaped(RS)); in suppressDeallocationsInSuspiciousContexts()
3096 if (const RefState *RS = C.getState()->get<RegionState>(Sym)) { in checkUseZeroAllocated() local
3097 if (RS->isAllocatedOfSizeZero()) in checkUseZeroAllocated()
3098 HandleUseZeroAlloc(C, RS->getStmt()->getSourceRange(), Sym); in checkUseZeroAllocated()
3129 RegionStateTy RS = state->get<RegionState>(); in evalAssume() local
3130 for (SymbolRef Sym : llvm::make_first_range(RS)) { in evalAssume()
3149 if (const RefState *RS = state->get<RegionState>(ReallocSym)) { in evalAssume() local
3150 if (RS->isReleased()) { in evalAssume()
3154 RefState::getAllocated(RS->getAllocationFamily(), RS->getStmt())); in evalAssume()
3351 static bool checkIfNewOrNewArrayFamily(const RefState *RS) { in checkIfNewOrNewArrayFamily() argument
3352 return (RS->getAllocationFamily() == AF_CXXNewArray || in checkIfNewOrNewArrayFamily()
3353 RS->getAllocationFamily() == AF_CXXNew); in checkIfNewOrNewArrayFamily()
3374 if (const RefState *RS = State->get<RegionState>(sym)) in checkPointerEscapeAux() local
3375 if (RS->isAllocated() || RS->isAllocatedOfSizeZero()) in checkPointerEscapeAux()
3376 if (!IsConstPointerEscape || checkIfNewOrNewArrayFamily(RS)) in checkPointerEscapeAux()
3377 State = State->set<RegionState>(sym, RefState::getEscaped(RS)); in checkPointerEscapeAux()
3625 RegionStateTy RS = State->get<RegionState>(); in printState() local
3627 if (!RS.isEmpty()) { in printState()
3629 for (auto [Sym, Data] : RS) { in printState()