[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy
Ella Ma via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 17 01:10:00 PDT 2023
OikawaKirie added inline comments.
================
Comment at: clang/test/Analysis/issue-55019.cpp:13-14
+
+void *malloc(size_t);
+void free(void *);
+
----------------
> Ah, I see that it's for c function declarations. If that's the case, have you considered adding the malloc and free declarations to that header?
What about doing this in another patch and updating all test cases that use malloc and free? Maybe other libc APIs as well?
The test case malloc-three-arg.c declares malloc and in a different signature and also includes this header. Simply doing so in this patch will lead to other conflicts.
================
Comment at: clang/test/Analysis/pr22954.c:581
clang_analyzer_eval(m27.s3[i] == 1); // expected-warning{{UNKNOWN}}\
expected-warning{{Potential leak of memory pointed to by 'm27.s4'}}
return 0;
----------------
Do I need to update all other leak expectation directions in this file as well? Such as this one here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152435/new/
https://reviews.llvm.org/D152435
More information about the cfe-commits
mailing list