• Home
  • Raw
  • Download

Lines Matching refs:CE

76   bool evalCall(const CallExpr *CE, CheckerContext &C) const;
80 void Fopen(CheckerContext &C, const CallExpr *CE) const;
81 void Tmpfile(CheckerContext &C, const CallExpr *CE) const;
82 void Fclose(CheckerContext &C, const CallExpr *CE) const;
83 void Fread(CheckerContext &C, const CallExpr *CE) const;
84 void Fwrite(CheckerContext &C, const CallExpr *CE) const;
85 void Fseek(CheckerContext &C, const CallExpr *CE) const;
86 void Ftell(CheckerContext &C, const CallExpr *CE) const;
87 void Rewind(CheckerContext &C, const CallExpr *CE) const;
88 void Fgetpos(CheckerContext &C, const CallExpr *CE) const;
89 void Fsetpos(CheckerContext &C, const CallExpr *CE) const;
90 void Clearerr(CheckerContext &C, const CallExpr *CE) const;
91 void Feof(CheckerContext &C, const CallExpr *CE) const;
92 void Ferror(CheckerContext &C, const CallExpr *CE) const;
93 void Fileno(CheckerContext &C, const CallExpr *CE) const;
95 void OpenFileAux(CheckerContext &C, const CallExpr *CE) const;
99 ProgramStateRef CheckDoubleClose(const CallExpr *CE, ProgramStateRef state,
108 bool StreamChecker::evalCall(const CallExpr *CE, CheckerContext &C) const { in REGISTER_MAP_WITH_PROGRAMSTATE()
109 const FunctionDecl *FD = C.getCalleeDecl(CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
144 Fopen(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
148 Tmpfile(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
152 Fclose(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
156 Fread(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
160 Fwrite(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
164 Fseek(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
168 Ftell(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
172 Rewind(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
176 Fgetpos(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
180 Fsetpos(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
184 Clearerr(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
188 Feof(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
192 Ferror(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
196 Fileno(C, CE); in REGISTER_MAP_WITH_PROGRAMSTATE()
203 void StreamChecker::Fopen(CheckerContext &C, const CallExpr *CE) const { in Fopen()
204 OpenFileAux(C, CE); in Fopen()
207 void StreamChecker::Tmpfile(CheckerContext &C, const CallExpr *CE) const { in Tmpfile()
208 OpenFileAux(C, CE); in Tmpfile()
211 void StreamChecker::OpenFileAux(CheckerContext &C, const CallExpr *CE) const { in OpenFileAux()
215 DefinedSVal RetVal = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, in OpenFileAux()
218 state = state->BindExpr(CE, C.getLocationContext(), RetVal); in OpenFileAux()
229 stateNotNull->set<StreamMap>(Sym,StreamState::getOpened(CE)); in OpenFileAux()
231 stateNull->set<StreamMap>(Sym, StreamState::getOpenFailed(CE)); in OpenFileAux()
238 void StreamChecker::Fclose(CheckerContext &C, const CallExpr *CE) const { in Fclose()
239 ProgramStateRef state = CheckDoubleClose(CE, C.getState(), C); in Fclose()
244 void StreamChecker::Fread(CheckerContext &C, const CallExpr *CE) const { in Fread()
246 if (!CheckNullStream(state->getSVal(CE->getArg(3), C.getLocationContext()), in Fread()
251 void StreamChecker::Fwrite(CheckerContext &C, const CallExpr *CE) const { in Fwrite()
253 if (!CheckNullStream(state->getSVal(CE->getArg(3), C.getLocationContext()), in Fwrite()
258 void StreamChecker::Fseek(CheckerContext &C, const CallExpr *CE) const { in Fseek()
260 if (!(state = CheckNullStream(state->getSVal(CE->getArg(0), in Fseek()
264 SVal Whence = state->getSVal(CE->getArg(2), C.getLocationContext()); in Fseek()
285 void StreamChecker::Ftell(CheckerContext &C, const CallExpr *CE) const { in Ftell()
287 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Ftell()
292 void StreamChecker::Rewind(CheckerContext &C, const CallExpr *CE) const { in Rewind()
294 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Rewind()
299 void StreamChecker::Fgetpos(CheckerContext &C, const CallExpr *CE) const { in Fgetpos()
301 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Fgetpos()
306 void StreamChecker::Fsetpos(CheckerContext &C, const CallExpr *CE) const { in Fsetpos()
308 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Fsetpos()
313 void StreamChecker::Clearerr(CheckerContext &C, const CallExpr *CE) const { in Clearerr()
315 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Clearerr()
320 void StreamChecker::Feof(CheckerContext &C, const CallExpr *CE) const { in Feof()
322 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Feof()
327 void StreamChecker::Ferror(CheckerContext &C, const CallExpr *CE) const { in Ferror()
329 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Ferror()
334 void StreamChecker::Fileno(CheckerContext &C, const CallExpr *CE) const { in Fileno()
336 if (!CheckNullStream(state->getSVal(CE->getArg(0), C.getLocationContext()), in Fileno()
364 ProgramStateRef StreamChecker::CheckDoubleClose(const CallExpr *CE, in CheckDoubleClose() argument
368 state->getSVal(CE->getArg(0), C.getLocationContext()).getAsSymbol(); in CheckDoubleClose()
394 return state->set<StreamMap>(Sym, StreamState::getClosed(CE)); in CheckDoubleClose()