================ @@ -639,12 +644,7 @@ void StreamChecker::preFreadFwrite(const FnDescription *Desc, bool IsFread) const { ProgramStateRef State = C.getState(); SVal StreamVal = getStreamArg(Desc, Call); - State = ensureStreamNonNull(StreamVal, Call.getArgExpr(Desc->StreamArgNo), C, - State); - if (!State) - return; - State = ensureStreamOpened(StreamVal, C, State); - if (!State) + if (!basicCheck(Desc, Call, C, State, StreamVal)) ---------------- balazske wrote:
The function returns a state that is modified further by the following functions. Otherwise the state changes applied in `basicCheck` are lost. (`ensureStreamNonNull` does a state change, `ensureStreamOpened` does not, but all return a state to make the usage similar.) https://github.com/llvm/llvm-project/pull/71394 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits