================ @@ -303,3 +346,29 @@ void error_indeterminate_feof2(void) { } fclose(F); } + +void error_indeterminate_feof3(void) { + FILE *F = fopen("file", "r+"); + if (!F) + return; + if (fgetc(F) == EOF) { + if (feof(F)) { + // error is feof, should be non-indeterminate + fputc('A', F); // no warning + } + } + fclose(F); +} + +void error_indeterminate_feof4(void) { ---------------- balazske wrote:
This test seems to be not necessary (previous tests cover these conditions), otherwise a more meaningful name should be chosen for it. https://github.com/llvm/llvm-project/pull/72627 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits