[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)
Pavel Skripkin via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 10:16:11 PDT 2024
================
@@ -14,6 +14,13 @@
void free(void *);
void __attribute((ownership_takes(malloc, 1))) my_free(void *);
+void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t);
----------------
pskrgag wrote:
Seems like it works fine. At least, new test case passes. I guess, clang picks the most specific declaration
https://github.com/llvm/llvm-project/pull/98941
More information about the cfe-commits
mailing list