clang/test/SemaObjC/block-return.m
raw| 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -fobjc-gc-only %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | @interface NSString |
| 5 | - (__attribute__((objc_gc(strong))) const char *)UTF8String; |
| 6 | @end |
| 7 | |
| 8 | int main(void) { |
| 9 | __attribute__((objc_gc(strong))) char const *(^libraryNameForIndex)(void) = ^(void) { |
| 10 | NSString *moduleName; |
| 11 | return [moduleName UTF8String]; |
| 12 | }; |
| 13 | } |