diff options
Diffstat (limited to 'test/Sema/block-return.c')
-rw-r--r-- | test/Sema/block-return.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c index 10b3b8480cc9..33fd183be069 100644 --- a/test/Sema/block-return.c +++ b/test/Sema/block-return.c @@ -109,8 +109,11 @@ void foo6() { void foo7() { - const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'int const (^)(void)' with an expression of type 'int (^)(void)'}} - const int (^CC) (void) = ^const int{ const int i = 1; return i; }; // OK + const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'int const (^)(void)' with an expression of type 'int (^)(void)'}} \ + // expected-warning{{type qualifier on return type has no effect}} + + const int (^CC) (void) = ^const int{ const int i = 1; return i; }; // expected-warning{{type qualifier on return type has no effect}} + int i; int (^FF) (void) = ^{ return i; }; // OK |