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