[clang] [analyzer][StackAddrEscapeChecker] Fix assert failure for alloca regions (PR #109655)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 05:49:18 PDT 2024
================
@@ -846,3 +851,25 @@ void top(char **p) {
foo(); // no-warning FIXME: p binding is reclaimed before the function end
}
} // namespace early_reclaim_dead_limitation
+
+using size_t = decltype(sizeof(int));
+void * malloc(size_t size);
+void free(void*);
----------------
steakhal wrote:
We usually put these at the top of the tests.
You could also consider including some system header simulator to get these declarations.
https://github.com/llvm/llvm-project/pull/109655
More information about the cfe-commits
mailing list