[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Its a bit hard to judge this. Have you tested this on open source projects? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78280/new/ https://reviews.llvm.org/D78280 ___

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-06-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:36 + /// (False if the stream was first encountered in a non-opening function.) + bool OpenEncountered; baloghadamsoftware wrote: > Maybe `SawOpened` or

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-05-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added a comment. Currently priority of this change is lower than D78374 . If a similar change is done a "escaped" stream state will be needed too. Comment at:

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-05-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/stream.c:11-13 +void check_feread_noopen(FILE *fp) { + fread(0, 0, 0, fp); +} What do these tests test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-05-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I like this idea, except the word `OpenEncountered`, but that might be a matter of taste. Please try this patch on several open-source projects, such as //BitCoin//, //CURL//, //OpenSSL//, //PostGreS//, //TMux// and //Xerces//. Then compare the results

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-04-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. The high level idea seems great after surveying the analyzer for similar issues, but I might need to think about this a bit longer. @baloghadamsoftware, IteratorChecker needs to solve similar problems, right? Do you have any input on this? Repository: rG LLVM

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-04-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I am not sure if this is the best approach: In a similar case (no opening function encountered) it is possible that the stream is already "escaped", there could be references to it from outside the analyzed function (to which it was passed, or got from another

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-04-16 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. If a stream