DiagID, getLang());
break;
case tok::kw_auto:
- if (getLang().CPlusPlus0x)
+ if (getLang().CPlusPlus0x || getLang().ObjC1)
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_auto, Loc, PrevSpec,
DiagID);
else
--- /dev/null
+// 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