[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 07:40:49 PST 2020


balazske created this revision.
Herald added subscribers: cfe-commits, martong, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: clang.
balazske added a comment.

For older discussion see this:
https://reviews.llvm.org/D75356

Functions `feof` and `ferror` are added to show how the stream error flags are used and to make tests possible.


A new field is added to the stream state to store the actual error.
Function `fseek` is implemented to set the error state.
(More are to be added later.)
Modeling of stream error state handling functions is added.

(`clearerr` is not done yet but should follow.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75682

Files:
  clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
  clang/test/Analysis/Inputs/system-header-simulator.h
  clang/test/Analysis/stream-error.c
  clang/test/Analysis/stream.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75682.248478.patch
Type: text/x-patch
Size: 16652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200305/b8dbced4/attachment-0001.bin>


More information about the cfe-commits mailing list