diff options
Diffstat (limited to 'test/SemaObjCXX/foreach-block.mm')
-rw-r--r-- | test/SemaObjCXX/foreach-block.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjCXX/foreach-block.mm b/test/SemaObjCXX/foreach-block.mm new file mode 100644 index 0000000..91bd0c8 --- /dev/null +++ b/test/SemaObjCXX/foreach-block.mm @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s +// rdar://8295106 + +int main() { +id array; + + for (int (^b)(void) in array) { + if (b() == 10000) { + return 1; + } + } + + int (^b)(void) in array; // expected-error {{expected ';' at end of declaration}} +} |