diff options
author | Anna Zaks <ganna@apple.com> | 2012-05-03 23:50:33 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-05-03 23:50:33 +0000 |
commit | 6ccfcf346d6af9e2f42e723a0a64740d14387fd3 (patch) | |
tree | 3b3927ce3d3f6c9567e71b1d75cdbc73de6d2ac9 /clang/test/Analysis/system-header-simulator.h | |
parent | 228f9c7b68fd2bf56b32623251b54f3d3c9ee3b7 (diff) | |
download | bcm5719-llvm-6ccfcf346d6af9e2f42e723a0a64740d14387fd3.tar.gz bcm5719-llvm-6ccfcf346d6af9e2f42e723a0a64740d14387fd3.zip |
[analyzer] Assume pointer escapes when a callback is passed inside
a struct.
llvm-svn: 156135
Diffstat (limited to 'clang/test/Analysis/system-header-simulator.h')
-rw-r--r-- | clang/test/Analysis/system-header-simulator.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/system-header-simulator.h b/clang/test/Analysis/system-header-simulator.h index c910ad9694c..a8cba9ce5b2 100644 --- a/clang/test/Analysis/system-header-simulator.h +++ b/clang/test/Analysis/system-header-simulator.h @@ -37,3 +37,12 @@ FILE *funopen(const void *, int (*)(void *)); int sqlite3_bind_text_my(int, const char*, int n, void(*)(void*)); + +typedef void (*freeCallback) (void*); +typedef struct { + int i; + freeCallback fc; +} StWithCallback; + +int dealocateMemWhenDoneByVal(void*, StWithCallback); +int dealocateMemWhenDoneByRef(StWithCallback*, const void*); |