summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/system-header-simulator.h
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-05-03 23:50:33 +0000
committerAnna Zaks <ganna@apple.com>2012-05-03 23:50:33 +0000
commit6ccfcf346d6af9e2f42e723a0a64740d14387fd3 (patch)
tree3b3927ce3d3f6c9567e71b1d75cdbc73de6d2ac9 /clang/test/Analysis/system-header-simulator.h
parent228f9c7b68fd2bf56b32623251b54f3d3c9ee3b7 (diff)
downloadbcm5719-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.h9
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*);
OpenPOWER on IntegriCloud