summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/blocks.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/blocks.m')
-rw-r--r--test/SemaObjC/blocks.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m
index ddac7d1..15aa581 100644
--- a/test/SemaObjC/blocks.m
+++ b/test/SemaObjC/blocks.m
@@ -21,9 +21,9 @@ void foo4(id (^objectCreationBlock)(int)) {
return bar4(objectCreationBlock);
}
-void bar5(id(^)(void));
+void bar5(id(^)(void)); // expected-note{{passing argument to parameter here}}
void foo5(id (^objectCreationBlock)(int)) {
- return bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(int)', expected 'id (^)(void)'}}
+ return bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(int)' to parameter of type 'id (^)(void)'}}
}
void bar6(id(^)(int));
@@ -39,10 +39,10 @@ void foo7(id (^x)(int)) {
@end
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}}
+ void *P = ^(itf x) {}; // expected-error {{Objective-C interface type 'itf' cannot be passed by value; did you forget * in 'itf'}}
+ P = ^itf(int x) {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}}
+ P = ^itf() {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}}
+ P = ^itf{}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}}
}
OpenPOWER on IntegriCloud