summaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/arc-memfunc.mm
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
commit180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (patch)
tree2097d084eb235c0b12c0bff3445f4ec7bbaa8a12 /test/SemaObjCXX/arc-memfunc.mm
parent29cafa66ad3878dbb9f82615f19fa0bded2e443c (diff)
Notes
Diffstat (limited to 'test/SemaObjCXX/arc-memfunc.mm')
-rw-r--r--test/SemaObjCXX/arc-memfunc.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjCXX/arc-memfunc.mm b/test/SemaObjCXX/arc-memfunc.mm
new file mode 100644
index 0000000000000..75b94c64e7274
--- /dev/null
+++ b/test/SemaObjCXX/arc-memfunc.mm
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -verify -fblocks %s
+
+struct X0 {
+ static id makeObject1() __attribute__((ns_returns_retained));
+ id makeObject2() __attribute__((ns_returns_retained));
+};
+
+void test_X0(X0 x0, X0 *x0p) {
+ X0::makeObject1();
+ x0.makeObject2();
+ x0p->makeObject2();
+ id (X0::*pmf)() __attribute__((ns_returns_retained)) = &X0::makeObject2;
+ (x0.*pmf)();
+ (x0p->*pmf)();
+}