Start parsing ObjC classes/categories!

Next step, refactor Parser::ParseStructUnionBody() so that struct declarations can
be shared with Objective-C (for declaring instance variables).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41200 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index 7ff0609..34c9ca6 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -370,6 +370,13 @@
     return Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
   }
   
+  // OBJC: This grammar hack allows prefix attributes on class interfaces.
+  if (Tok.getKind() == tok::at) {
+    SourceLocation AtLoc = ConsumeToken(); // the "@"
+    if (Tok.getIdentifierInfo()->getObjCKeywordID() == tok::objc_interface)
+      return ParseObjCAtInterfaceDeclaration(AtLoc, DS.getAttributes()); 
+  }
+  
   // Parse the first declarator.
   Declarator DeclaratorInfo(DS, Declarator::FileContext);
   ParseDeclarator(DeclaratorInfo);