[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-20 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9b7c43d341da: [Analyzer][StreamChecker] Report every leak, clean up state. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 279133. balazske added a comment. Rebase to master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/ https://reviews.llvm.org/D82845 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp clan

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 279131. balazske added a comment. Fixed formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/ https://reviews.llvm.org/D82845 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp clan

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 278755. balazske added a comment. Checking notes in test `f_leak_2`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/ https://reviews.llvm.org/D82845 Files: clang/lib/StaticAnalyzer/Checkers/StreamC

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-10 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. I'd prefer if you moved `f_leak_2` to `stream-notes.c`. Otherwise, LGTM. Comment at: clang/test/Analysis/stream.c:147-150 + FILE *p1 = fopen("foo1.c", "r"); + if (!p1

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 275311. balazske added a comment. Rebase, added a FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/ https://reviews.llvm.org/D82845 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:969 + // Do not warn for non-closed stream at program exit. + if (Pred && Pred->getCFGBlock() && Pred->getCFGBlock()->hasNoReturnElement())

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:969 + // Do not warn for non-closed stream at program exit. + if (Pred && Pred->getCFGBlock() && Pred->getCFGBlock()->hasNoReturnElement()) +return Pred; balazske wro

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The problem is that `PathDiagnostic::Profile` does not use the uniqueing locations. Two `PathDiagnostic` objects with different uniqueing location but otherwise same data are counted as "same" and only one is kept (`BugReporter::FlushReport`). How to fix this? - Add u

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D82845#2123283 , @baloghadamsoftware wrote: > In D82845#2122984 , @balazske wrote: > > > I checked it with simple debug print, the `LeakedSyms` will contain 2 items > > with different

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D82845#2122984 , @balazske wrote: > I checked it with simple debug print, the `LeakedSyms` will contain 2 items > with different `StreamOpenNode`. So I think these should be independent > problem reports for the bug

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D82845#2122984 , @balazske wrote: > I checked it with simple debug print, the `LeakedSyms` will contain 2 items > with different `StreamOpenNode`. So I think these should be independent > problem reports for the bug reporter

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:969 + // Do not warn for non-closed stream at program exit. + if (Pred && Pred->getCFGBlock() && Pred->getCFGBlock()->hasNoReturnElement())

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I checked it with simple debug print, the `LeakedSyms` will contain 2 items with different `StreamOpenNode`. So I think these should be independent problem reports for the bug reporter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D82845#2121940 , @balazske wrote: > Why does this not work? > I get only warning for the first resource leak (in the test `f_leak_2`). How > to fix this? First off, are two errors detected by the checker? You could check t

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Why does this not work? I get only warning for the first resource leak (in the test `f_leak_2`). How to fix this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82845/new/ https://reviews.llvm.org/D82845 ___

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-06-30 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. balazske added a