================ @@ -101,6 +101,23 @@ void error_fwrite(void) { Ret = fwrite(0, 1, 10, F); // expected-warning {{Stream might be already closed}} } +void error_fputc(void) { + FILE *F = tmpfile(); + if (!F) + return; + int Ret = fputc('X', F); + if (Ret == EOF) { ---------------- balazske wrote:
I would add a line with `clang_analyzer_eval(feof(F));` expected as FALSE to both of the branches of `if`. This test is analogous to `error_fwrite` only with `fputc`. https://github.com/llvm/llvm-project/pull/71518 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits