From d263fd1451299b1e5f5f1acb2bb13b0a4119aee8 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 11 Feb 2011 18:46:17 +0000 Subject: Fix a block sema bug where result type of initializer is unqualified but its initialized is qualified. This is for c only and fixes the imm. problem. c++ is more involved and is wip. // rdar://8979379 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125386 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/block-return.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/Sema/block-return.c') diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c index 23dbbc2ce6..c6e1e9dc54 100644 --- a/test/Sema/block-return.c +++ b/test/Sema/block-return.c @@ -110,7 +110,7 @@ void foo6() { void foo7() { - const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'const int (^)(void)' with an expression of type 'int (^)(void)'}} + const int (^BB) (void) = ^{ const int i = 1; return i; }; // OK - initializing 'const int (^)(void)' with an expression of type 'int (^)(void)' const int (^CC) (void) = ^const int{ const int i = 1; return i; }; -- cgit v1.2.3-18-g5258