http://llvm.org/bugs/show_bug.cgi?id=15790
Bug ID: 15790
Summary: MallocWithAnnotations should support annotating a
realloc-like function
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
I'd expect something like the following to be possible (wrapping realloc).
It seems not to work.
#include <stdlib.h>
void *my_realloc(void *ptr, size_t size)
__attribute__((ownership_takes(malloc,1)))
__attribute__((ownership_returns(malloc,2)));
void
test()
{
void *ptr = malloc(10);
ptr = my_realloc(ptr, 11);
free(ptr);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs