[cfe-commits] r156214 - /cfe/trunk/test/Analysis/malloc.cpp
Anna Zaks
ganna at apple.com
Fri May 4 15:18:36 PDT 2012
Author: zaks
Date: Fri May 4 17:18:36 2012
New Revision: 156214
URL: http://llvm.org/viewvc/llvm-project?rev=156214&view=rev
Log:
[analyzer] One more pointer escape test.
Modified:
cfe/trunk/test/Analysis/malloc.cpp
Modified: cfe/trunk/test/Analysis/malloc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/malloc.cpp?rev=156214&r1=156213&r2=156214&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/malloc.cpp (original)
+++ cfe/trunk/test/Analysis/malloc.cpp Fri May 4 17:18:36 2012
@@ -24,3 +24,14 @@
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);
+}
+
More information about the cfe-commits
mailing list