summaryrefslogtreecommitdiff
path: root/test/SemaObjC/block-literal-with-attribute.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
commit461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch)
tree6942083d7d56bba40ec790a453ca58ad3baf6832 /test/SemaObjC/block-literal-with-attribute.m
parent75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff)
Notes
Diffstat (limited to 'test/SemaObjC/block-literal-with-attribute.m')
-rw-r--r--test/SemaObjC/block-literal-with-attribute.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/block-literal-with-attribute.m b/test/SemaObjC/block-literal-with-attribute.m
new file mode 100644
index 0000000000000..2a8057927ee57
--- /dev/null
+++ b/test/SemaObjC/block-literal-with-attribute.m
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks -fobjc-arc
+// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
+
+__auto_type block = ^ id __attribute__((ns_returns_retained)) (id filter) {
+ return filter; // ok
+};
+__auto_type block2 = ^ __attribute__((ns_returns_retained)) id (id filter) {
+ return filter; // ok
+};
+__auto_type block3 = ^ id (id filter) __attribute__((ns_returns_retained)) {
+ return filter; // ok
+};
+
+// expected-no-diagnostics