================ @@ -299,6 +299,15 @@ void error_fseek_0(void) { fclose(F); } +void error_fflush(void) { + FILE *F = tmpfile(); + if (!F) + return; + fclose(F); + fflush(F); // expected-warning {{Stream might be already closed}} + fflush(NULL); // no-warning ---------------- balazske wrote:
The `fflush(NULL)` should be before `fflush(F)` (probably at the start of the function) because analysis may stop when a warning is emitted (and following code is not reachable). https://github.com/llvm/llvm-project/pull/74296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits