diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-21 18:37:13 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-21 18:37:13 +0000 |
commit | 6c6b0ebc33c4db48355078a45a21cb6867e298b1 (patch) | |
tree | 9c6001a7dc325f0b0a819dca4d67f40f6bceaaa0 /test | |
parent | a2e40219e0a8f609a6c4cfc213223f02a3cef3c9 (diff) |
Turn on 'auto' in plain objc mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaObjC/auto-objective-c.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaObjC/auto-objective-c.m b/test/SemaObjC/auto-objective-c.m new file mode 100644 index 0000000000..e73f899ac6 --- /dev/null +++ b/test/SemaObjC/auto-objective-c.m @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -x objective-c -fblocks -fsyntax-only -verify %s + +@interface I +{ + id pi; +} +- (id) Meth; +@end + + +typedef int (^P) (int x); + +@implementation I +- (id) Meth { + auto p = [pi Meth]; + return p; +} + +- (P) bfunc { + auto my_block = ^int (int x) {return x; }; + my_block(1); + return my_block; +} +@end |