[clang] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

Pavel Skripkin via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 10:50:17 PDT 2024


================
@@ -58,14 +60,14 @@ void testFreeOpNew() {
   void *p = operator new(0);
   free(p);
   // mismatch-warning at -1{{Memory allocated by 'operator new' should be deallocated by 'delete', not 'free()'}}
-} // leak-warning{{Potential leak of memory pointed to by 'p'}}
+}
----------------
pskrgag wrote:

To be clear, these `leak-warning` s were added during WIP stage of this PR and then I dropped it after I added invalidation of freed regions.

I will anyway check if it is be possible to add them, tho

https://github.com/llvm/llvm-project/pull/106081


More information about the cfe-commits mailing list