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

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 14 08:05:52 PDT 2020


balazske marked an inline comment as done.
balazske added a comment.

Currently priority of this change is lower than D78374 <https://reviews.llvm.org/D78374>.
If a similar change is done a "escaped" stream state will be needed too.



================
Comment at: clang/test/Analysis/stream.c:11-13
+void check_feread_noopen(FILE *fp) {
+  fread(0, 0, 0, fp);
+}
----------------
NoQ wrote:
> What do these tests test?
There should be no warning about resource leak (file not closed). This may be not the best approach to show what the checker does. Some other detectable problem should be added to show that the functions are not ignored by the checker.
(I do not like that the buffer argument is 0 here, probably other checker should check this.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78280/new/

https://reviews.llvm.org/D78280





More information about the cfe-commits mailing list