[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. I want to test the StreamChecker for false positives. Page http://clang.llvm.org/analyzer/open_projects.html says that it has too much false positives because state splitting (I did not see this page before.) There is an alter

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7c9f77ef372: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'. (authored by balazske). Changed prior to commit: https://reviews.llvm.org/D80015?vs=264843&id=265159#toc Repository: rG

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. This patch is great. LGTM! In D80015#2043263 , @balazske wrote: > If the unit of the change is adding `fread` and `fwrite` completely, the > war

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 264843. balazske marked 5 inline comments as done. balazske added a comment. Renamed "Count" to "NMemb", fixed `operator !=`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80015/new/ https://reviews.llvm.org/D

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. If the unit of the change is adding `fread` and `fwrite` completely, the warning with FEOF at `fread` is correct to add because it belongs to `fread`. I was planning to add some file handling functions to the checker that have a basic functionality implemented. In this

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. But just to assure you, this patch is practically perfect. I don't think we're going to have any hiccups moving forward with this. Again, thank you for all the patience! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8001

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D80015#2041653 , @balazske wrote: > The difference of fread and fwrite comes from the fact that `fwrite` can > always succeed, `fread` does not succeed in EOF state. > The plan is to add the file functions sequentially. From

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added a comment. The difference of fread and fwrite comes from the fact that `fwrite` can always succeed, `fread` does not succeed in EOF state. The plan is to add the file functions sequentially. From the currently implemented functions only `

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I think the warning about EOF could be a separate patch, and it could be implemented for most stream operations. The patch in large looks great, but I'm just not sure why we handle fwrite so differently. Could you please explain? Comment at: clang/l

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, ASDenysPetrov, 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. Stream function