This is an archive of the discontinued LLVM Phabricator instance.

[Analyzer][StreamChecker] Check for opened stream before operations.
ClosedPublic

Authored by balazske on Mar 4 2020, 8:23 AM.

Details

Summary

According to documentations, after an fclose call any other stream
operations cause undefined behaviour, regardless if the close failed
or not.
This change adds the check for the opened state before all other
(applicable) operations.

Diff Detail