fix blocks to reject objc interfaces returned by value. Also,
a block without a prototype should still coerce a return in it to
use the declared return type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m
index b27d65d..544eddd 100644
--- a/test/SemaObjC/blocks.m
+++ b/test/SemaObjC/blocks.m
@@ -40,4 +40,7 @@
void foo8() {
void *P = ^(itf x) {}; // expected-error {{Objective-C interface type 'itf' cannot be passed by value}}
+ P = ^itf(int x) {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value}}
+ P = ^itf() {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value}}
+ P = ^itf{}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value}}
}