The goal of this commit is to get just enough Sema support to recognize Objective-C classes
as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very*
preliminary.
The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41752 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/MinimalAction.cpp b/Parse/MinimalAction.cpp
index 65bdca6..8ca7258 100644
--- a/Parse/MinimalAction.cpp
+++ b/Parse/MinimalAction.cpp
@@ -68,12 +68,24 @@
return 0;
}
-/// ParsedObjcClassDeclaration -
+Action::DeclTy *
+MinimalAction::ObjcStartClassInterface(SourceLocation AtInterafceLoc,
+ IdentifierInfo *ClassName, SourceLocation ClassLoc,
+ IdentifierInfo *SuperName, SourceLocation SuperLoc,
+ IdentifierInfo **ProtocolNames, unsigned NumProtocols,
+ AttributeList *AttrList) {
+ TypeNameInfo *TI =
+ new TypeNameInfo(1, ClassName->getFETokenInfo<TypeNameInfo>());
+
+ ClassName->setFETokenInfo(TI);
+ return 0;
+}
+
+/// ObjcClassDeclaration -
/// Scope will always be top level file scope.
Action::DeclTy *
-MinimalAction::ParsedObjcClassDeclaration(Scope *S,
- IdentifierInfo **IdentList,
- unsigned NumElts) {
+MinimalAction::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList, unsigned NumElts) {
for (unsigned i = 0; i != NumElts; ++i) {
TypeNameInfo *TI =
new TypeNameInfo(1, IdentList[i]->getFETokenInfo<TypeNameInfo>());