aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/block-return.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-12-03 23:53:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-12-03 23:53:56 +0000
commit649657e7d6c150136cae5ab22e39b9794cff80cc (patch)
tree40da8805502ae163345739a02c0ed6d62a00f589 /test/Sema/block-return.c
parent14795c86f1c37874afa332a7b9bc18e6a02bf420 (diff)
Move block return type inference diagnostic to a common place where
Function or array lvalue conversions happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/block-return.c')
-rw-r--r--test/Sema/block-return.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c
index 293967fea1..70fb3e104e 100644
--- a/test/Sema/block-return.c
+++ b/test/Sema/block-return.c
@@ -9,14 +9,14 @@ CL foo() {
CL X = ^{
if (2)
return;
- return 1; // expected-error {{void block should not return a value}}
+ return 1; // expected-error {{return type 'int' must match previous return type 'void' when block literal has unspecified explicit return type}}
};
int (^Y) (void) = ^{
if (3)
return 1;
else
- return; // expected-error {{non-void block should return a value}}
+ return; // expected-error {{return type 'void' must match previous return type 'int' when block literal has unspecified explicit return type}}
};
char *(^Z)(void) = ^{