diff options
Diffstat (limited to 'test/Analysis/malloc.cpp')
-rw-r--r-- | test/Analysis/malloc.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/malloc.cpp b/test/Analysis/malloc.cpp index f36d8fcb7b..72b9272213 100644 --- a/test/Analysis/malloc.cpp +++ b/test/Analysis/malloc.cpp @@ -24,3 +24,14 @@ void r11160612_3() { char *x = (char*)malloc(12); const_ptr_and_callback_def_param(0, x, 12); } + +// Test member function pointer. +struct CanFreeMemory { + static void myFree(void*); +}; +//This is handled because we look at the type of the parameter(not argument). +void r11160612_3(CanFreeMemory* p) { + char *x = (char*)malloc(12); + const_ptr_and_callback_def_param(0, x, 12, p->myFree); +} + |