-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Analyzer][StreamChecker] Added check for "indeterminate file position".
Summary: According to the standard, after a `wread` or `fwrite` call the file position becomes "indeterminate". It is assumable that a next read or write causes undefined behavior, so a (fatal error) warning is added for this case. The indeterminate position can be cleared by some operations, for example `fseek` or `freopen`, not with `clearerr`. Reviewers: Szelethus, baloghadamsoftware, martong, NoQ, xazax.hun, dcoughlin Reviewed By: Szelethus Subscribers: rnkovacs, NoQ, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80018
- Loading branch information
Showing
2 changed files
with
181 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters