From: Steve Naroff Date: Mon, 8 Oct 2007 23:10:47 +0000 (+0000) Subject: Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recogni... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e99080e7b2d79bd6f23573124917cda96e8f33;p=clang Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42777 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Parse/MinimalAction.cpp b/Parse/MinimalAction.cpp index 5e2fac2979..05b91dafc2 100644 --- a/Parse/MinimalAction.cpp +++ b/Parse/MinimalAction.cpp @@ -80,19 +80,6 @@ MinimalAction::ActOnStartClassInterface(Scope* S, SourceLocation AtInterafceLoc, return 0; } -Action::DeclTy * -MinimalAction::ActOnStartProtocolInterface(Scope* S, - SourceLocation AtProtoInterfaceLoc, - IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, - IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) { - - TypeNameInfo *TI = - new TypeNameInfo(1, ProtocolName->getFETokenInfo()); - - ProtocolName->setFETokenInfo(TI); - return 0; -} - /// ActOnForwardClassDeclaration - /// Scope will always be top level file scope. Action::DeclTy * @@ -110,23 +97,6 @@ MinimalAction::ActOnForwardClassDeclaration(Scope *S, SourceLocation AtClassLoc, return 0; } -/// ActOnForwardProtocolDeclaration - -/// Scope will always be top level file scope. -Action::DeclTy * -MinimalAction::ActOnForwardProtocolDeclaration(Scope *S, - SourceLocation AtClassLoc, IdentifierInfo **IdentList, unsigned NumElts) { - for (unsigned i = 0; i != NumElts; ++i) { - TypeNameInfo *TI = - new TypeNameInfo(1, IdentList[i]->getFETokenInfo()); - - IdentList[i]->setFETokenInfo(TI); - - // Remember that this needs to be removed when the scope is popped. - S->AddDecl(IdentList[i]); - } - return 0; -} - /// PopScope - When a scope is popped, if any typedefs are now out-of-scope, /// they are removed from the IdentifierInfo::FETokenInfo field. void MinimalAction::PopScope(SourceLocation Loc, Scope *S) { diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 07b21f700c..dad24a6947 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -606,20 +606,11 @@ public: IdentifierInfo **IdentList, unsigned NumElts); - virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S, - SourceLocation AtProtocolLoc, - IdentifierInfo **IdentList, - unsigned NumElts); - - virtual DeclTy *ActOnStartClassInterface(Scope* S, SourceLocation AtInterafceLoc, + virtual DeclTy *ActOnStartClassInterface(Scope* S, SourceLocation interLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, IdentifierInfo **ProtocolNames, unsigned NumProtocols, AttributeList *AttrList); - virtual DeclTy *ActOnStartProtocolInterface(Scope *S, - SourceLocation AtProtoInterfaceLoc, - IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, - IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs); }; } // end namespace clang