[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 00:29:39 PDT 2020
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())
+ return Pred;
----------------
NoQ wrote:
> balazske wrote:
> > Szelethus wrote:
> > > It is a realistic worry that either the predecessor exploded node or the CFGBlock is null? Could we assert this instead?
> > It may be simply more safe to check for it. I do not know if exactly if these can be null at this place.
> Please use `SuppressOnSink` instead.
That was my plan for the next patch. So I want to leave this as is for now (add a FIXME), it should be removed anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82845/new/
https://reviews.llvm.org/D82845
More information about the cfe-commits
mailing list