Lines Matching refs:state
95 ProgramStateRef CheckNullStream(SVal SV, ProgramStateRef state,
97 ProgramStateRef CheckDoubleClose(const CallExpr *CE, ProgramStateRef state,
210 ProgramStateRef state = C.getState();
215 state = state->BindExpr(CE, C.getLocationContext(), RetVal);
218 // Bifurcate the state into two: one with a valid FILE* pointer, the other
221 llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, RetVal);
224 // if RetVal is not NULL, set the symbol's state to Opened.
236 ProgramStateRef state = CheckDoubleClose(CE, C.getState(), C);
237 if (state)
238 C.addTransition(state);
242 ProgramStateRef state = C.getState();
243 if (!CheckNullStream(state->getSVal(CE->getArg(3), C.getLocationContext()),
244 state, C))
249 ProgramStateRef state = C.getState();
250 if (!CheckNullStream(state->getSVal(CE->getArg(3), C.getLocationContext()),
251 state, C))
256 ProgramStateRef state = C.getState();
257 if (!(state = CheckNullStream(state->getSVal(CE->getArg(0),
258 C.getLocationContext()), state, C)))
261 SVal Whence = state->getSVal(CE->getArg(2), C.getLocationContext());
271 if (ExplodedNode *N = C.addTransition(state)) {
283 ProgramStateRef state = C.getState();
284 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
285 state, C))
290 ProgramStateRef state = C.getState();
291 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
292 state, C))
297 ProgramStateRef state = C.getState();
298 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
299 state, C))
304 ProgramStateRef state = C.getState();
305 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
306 state, C))
311 ProgramStateRef state = C.getState();
312 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
313 state, C))
318 ProgramStateRef state = C.getState();
319 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
320 state, C))
325 ProgramStateRef state = C.getState();
326 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
327 state, C))
332 ProgramStateRef state = C.getState();
333 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()),
334 state, C))
338 ProgramStateRef StreamChecker::CheckNullStream(SVal SV, ProgramStateRef state,
346 llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, *DV);
362 ProgramStateRef state,
365 state->getSVal(CE->getArg(0), C.getLocationContext()).getAsSymbol();
367 return state;
369 const StreamState *SS = state->get<StreamMap>(Sym);
373 return state;
392 return state->set<StreamMap>(Sym, StreamState::getClosed(CE));
397 // TODO: Clean up the state.
401 ProgramStateRef state = C.getState();
402 const StreamState *SS = state->get<StreamMap>(Sym);