return QualType(Decl->TypeForDecl, 0);
}
+/// getObjcInterfaceType - Return the unique reference to the type for the
+/// specified ObjC interface decl.
+QualType ASTContext::getObjcInterfaceType(ObjcInterfaceDecl *Decl) {
+ if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
+
+ Decl->TypeForDecl = new ObjcInterfaceType(Decl);
+ Types.push_back(Decl->TypeForDecl);
+ return QualType(Decl->TypeForDecl, 0);
+}
+
/// getTypeOfExpr - Unlike many "get<Type>" functions, we can't unique
/// TypeOfExpr AST's (since expression's are never shared). For example,
/// multiple declarations that refer to "typeof(x)" all contain different
static unsigned nEnumDecls = 0;
static unsigned nTypedef = 0;
static unsigned nFieldDecls = 0;
+static unsigned nInterfaceDecls = 0;
static bool StatSwitch = false;
bool Decl::CollectingStats(bool enable) {
case Enum:
nEnumDecls++;
break;
+ case ObjcInterface:
+ nInterfaceDecls++;
+ break;
}
}
InnerString = getDecl()->getIdentifier()->getName() + InnerString;
}
+void ObjcInterfaceType::getAsStringInternal(std::string &InnerString) const {
+ if (!InnerString.empty()) // Prefix the basic type, e.g. 'typedefname X'.
+ InnerString = ' ' + InnerString;
+ InnerString = getDecl()->getIdentifier()->getName() + InnerString;
+}
+
void TagType::getAsStringInternal(std::string &InnerString) const {
if (!InnerString.empty()) // Prefix the basic type, e.g. 'typedefname X'.
InnerString = ' ' + InnerString;
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>());
case tok::objc_protocol:
return ParseObjCAtProtocolDeclaration(AtLoc);
case tok::objc_implementation:
- return ParseObjCAtImplementationDeclaration(AtLoc);
+ return ObjcImpDecl = ParseObjCAtImplementationDeclaration(AtLoc);
case tok::objc_end:
return ParseObjCAtEndDeclaration(AtLoc);
case tok::objc_compatibility_alias:
if (ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "@class"))
return 0;
- return Actions.ParsedObjcClassDeclaration(CurScope,
- &ClassNames[0], ClassNames.size());
+ return Actions.ObjcClassDeclaration(CurScope, atLoc,
+ &ClassNames[0], ClassNames.size());
}
///
if (attrList) // categories don't support attributes.
Diag(Tok, diag::err_objc_no_attributes_on_category);
- llvm::SmallVector<DeclTy*, 64> MethodDecls;
- ParseObjCInterfaceDeclList(0/*FIXME*/, MethodDecls);
+ ParseObjCInterfaceDeclList(0/*FIXME*/);
// The @ sign was already consumed by ParseObjCInterfaceDeclList().
if (Tok.isObjCAtKeyword(tok::objc_end)) {
IdentifierInfo *superClassId = 0;
SourceLocation superClassLoc;
- // FIXME: temporary hack to grok class names (until we have sema support).
- llvm::SmallVector<IdentifierInfo *, 1> ClassName;
- ClassName.push_back(nameId);
- Actions.ParsedObjcClassDeclaration(CurScope, &ClassName[0], 1);
-
if (Tok.getKind() == tok::colon) { // a super class is specified.
ConsumeToken();
if (Tok.getKind() != tok::identifier) {
superClassId, superClassLoc, &ProtocolRefs[0],
ProtocolRefs.size(), attrList);
- llvm::SmallVector<DeclTy*, 32> IvarDecls;
if (Tok.getKind() == tok::l_brace)
- ParseObjCClassInstanceVariables(ClsType, IvarDecls);
+ ParseObjCClassInstanceVariables(ClsType);
- llvm::SmallVector<DeclTy*, 64> MethodDecls;
- ParseObjCInterfaceDeclList(ClsType, MethodDecls);
+ ParseObjCInterfaceDeclList(ClsType);
// The @ sign was already consumed by ParseObjCInterfaceDeclList().
if (Tok.isObjCAtKeyword(tok::objc_end)) {
/// empty
/// objc-interface-decl-list objc-property-decl [OBJC2]
/// objc-interface-decl-list objc-method-requirement [OBJC2]
-/// objc-interface-decl-list objc-method-proto
+/// objc-interface-decl-list objc-method-proto ';'
/// objc-interface-decl-list declaration
/// objc-interface-decl-list ';'
///
/// @required
/// @optional
///
-void Parser::ParseObjCInterfaceDeclList(
- DeclTy *interfaceDecl, llvm::SmallVectorImpl<DeclTy*> &MethodDecls) {
- DeclTy *IDecl = 0;
+void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl) {
while (1) {
if (Tok.getKind() == tok::at) {
SourceLocation AtLoc = ConsumeToken(); // the "@"
}
}
if (Tok.getKind() == tok::minus || Tok.getKind() == tok::plus) {
- IDecl = ParseObjCMethodPrototype(true);
- MethodDecls.push_back(IDecl);
+ ParseObjCMethodPrototype(interfaceDecl);
+ // Consume the ';' here, since ParseObjCMethodPrototype() is re-used for
+ // method definitions.
+ ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "method proto");
continue;
}
if (Tok.getKind() == tok::semi)
else {
// FIXME: as the name implies, this rule allows function definitions.
// We could pass a flag or check for functions during semantic analysis.
- IDecl = ParseDeclarationOrFunctionDefinition();
- MethodDecls.push_back(IDecl);
+ ParseDeclarationOrFunctionDefinition();
}
}
}
}
}
-/// objc-methodproto:
+/// objc-method-proto:
/// objc-instance-method objc-method-decl objc-method-attributes[opt]
-/// ';'[opt]
-/// objc-class-method objc-method-decl objc-method-attributes[opt] ';'[opt]
+/// objc-class-method objc-method-decl objc-method-attributes[opt]
///
/// objc-instance-method: '-'
/// objc-class-method: '+'
/// objc-method-attributes: [OBJC2]
/// __attribute__((deprecated))
///
-Parser::DeclTy *Parser::ParseObjCMethodPrototype(bool decl) {
+Parser::DeclTy *Parser::ParseObjCMethodPrototype(DeclTy *CDecl) {
assert((Tok.getKind() == tok::minus || Tok.getKind() == tok::plus) &&
"expected +/-");
tok::TokenKind methodType = Tok.getKind();
SourceLocation methodLoc = ConsumeToken();
- // FIXME: deal with "context sensitive" protocol qualifiers in prototypes
DeclTy *MDecl = ParseObjCMethodDecl(methodType, methodLoc);
+
+ AttributeList *methodAttrs = 0;
+ // If attributes exist after the method, parse them.
+ if (getLang().ObjC2 && Tok.getKind() == tok::kw___attribute)
+ methodAttrs = ParseAttributes();
+
+ if (CDecl)
+ Actions.ObjcAddMethod(CDecl, MDecl, methodAttrs);
- if (decl)
- // Consume the ';'.
- ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "method proto");
+ // Since this rule is used for both method declarations and definitions,
+ // the caller is responsible for consuming the ';'.
return MDecl;
}
Declarator ParmDecl(DS, Declarator::PrototypeContext);
ParseDeclarator(ParmDecl);
}
- AttributeList *methodAttrs = 0;
- // If attributes exist after the method, parse them.
- if (getLang().ObjC2 && Tok.getKind() == tok::kw___attribute)
- methodAttrs = ParseAttributes();
-
// FIXME: Add support for optional parmameter list...
return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType,
- &KeyInfo[0], KeyInfo.size(),
- methodAttrs);
+ &KeyInfo[0], KeyInfo.size());
} else if (!selIdent) {
Diag(Tok, diag::err_expected_ident); // missing selector name.
}
- AttributeList *methodAttrs = 0;
- // If attributes exist after the method, parse them.
- if (getLang().ObjC2 && Tok.getKind() == tok::kw___attribute)
- methodAttrs = ParseAttributes();
- return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, selIdent,
- methodAttrs);
+ return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, selIdent);
}
/// objc-protocol-refs:
/// objc-instance-variable-decl:
/// struct-declaration
///
-void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl,
- llvm::SmallVectorImpl<DeclTy*> &IvarDecls) {
+void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl) {
assert(Tok.getKind() == tok::l_brace && "expected {");
+ llvm::SmallVector<DeclTy*, 16> IvarDecls;
SourceLocation LBraceLoc = ConsumeBrace(); // the "{"
}
}
ParseStructDeclaration(interfaceDecl, IvarDecls);
-
+ for (unsigned i = 0; i < IvarDecls.size(); i++)
+ Actions.ObjcAddInstanceVariable(interfaceDecl, IvarDecls[i], visibility);
+ IvarDecls.clear();
+
if (Tok.getKind() == tok::semi) {
ConsumeToken();
} else if (Tok.getKind() == tok::r_brace) {
/// objc-protocol-definition:
/// @protocol identifier
/// objc-protocol-refs[opt]
-/// objc-methodprotolist
+/// objc-interface-decl-list
/// @end
///
/// objc-protocol-forward-reference:
/// @protocol identifier-list ';'
///
/// "@protocol identifier ;" should be resolved as "@protocol
-/// identifier-list ;": objc-methodprotolist may not start with a
+/// identifier-list ;": objc-interface-decl-list may not start with a
/// semicolon in the first alternative if objc-protocol-refs are omitted.
Parser::DeclTy *Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc) {
if (ParseObjCProtocolReferences(ProtocolRefs))
return 0;
}
- llvm::SmallVector<DeclTy*, 64> MethodDecls;
- ParseObjCInterfaceDeclList(0/*FIXME*/, MethodDecls);
+ ParseObjCInterfaceDeclList(0/*FIXME*/);
// The @ sign was already consumed by ParseObjCInterfaceDeclList().
if (Tok.isObjCAtKeyword(tok::objc_end)) {
}
ConsumeToken(); // Consume super class name
}
- llvm::SmallVector<DeclTy*, 32> IvarDecls;
if (Tok.getKind() == tok::l_brace)
- ParseObjCClassInstanceVariables(0/*FIXME*/, IvarDecls); // we have ivars
+ ParseObjCClassInstanceVariables(0/*FIXME*/); // we have ivars
return 0;
}
return 0;
}
-/// objc-method-def: objc-methodproto ';'[opt] '{' body '}'
+/// objc-method-def: objc-method-proto ';'[opt] '{' body '}'
///
void Parser::ParseObjCInstanceMethodDefinition() {
assert(Tok.getKind() == tok::minus &&
"ParseObjCInstanceMethodDefinition(): Expected '-'");
- ParseObjCMethodPrototype(false);
+ ParseObjCMethodPrototype(ObjcImpDecl);
// parse optional ';'
if (Tok.getKind() == tok::semi)
ConsumeToken();
StmtResult FnBody = ParseCompoundStatementBody();
}
-/// objc-method-def: objc-methodproto ';'[opt] '{' body '}'
+/// objc-method-def: objc-method-proto ';'[opt] '{' body '}'
///
void Parser::ParseObjCClassMethodDefinition() {
assert(Tok.getKind() == tok::plus &&
"ParseObjCClassMethodDefinition(): Expected '+'");
- ParseObjCMethodPrototype(false);
+ ParseObjCMethodPrototype(ObjcImpDecl);
// parse optional ';'
if (Tok.getKind() == tok::semi)
ConsumeToken();
CurScope = 0;
NumCachedScopes = 0;
ParenCount = BracketCount = BraceCount = 0;
+ ObjcImpDecl = 0;
}
/// Out-of-line virtual destructor to provide home for Action class.
TypeTy *Ty,
SourceLocation RParenLoc);
+ // Objective-C declarations.
+ virtual DeclTy *ObjcStartClassInterface(SourceLocation AtInterafceLoc,
+ IdentifierInfo *ClassName, SourceLocation ClassLoc,
+ IdentifierInfo *SuperName, SourceLocation SuperLoc,
+ IdentifierInfo **ProtocolNames, unsigned NumProtocols,
+ AttributeList *AttrList);
+
+ virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList,
+ unsigned NumElts);
+
private:
// UsualUnaryConversions - promotes integers (C99 6.3.1.1p2) and converts
// functions and arrays to their respective pointers (C99 6.3.2.1).
using namespace clang;
Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
- return dyn_cast_or_null<TypedefDecl>(II.getFETokenInfo<Decl>());
+ Decl *IIDecl = II.getFETokenInfo<Decl>();
+ if (dyn_cast_or_null<TypedefDecl>(IIDecl) ||
+ dyn_cast_or_null<ObjcInterfaceDecl>(IIDecl))
+ return IIDecl;
+ return 0;
}
void Sema::PopScope(SourceLocation Loc, Scope *S) {
return NewTD;
}
+Sema::DeclTy *Sema::ObjcStartClassInterface(SourceLocation AtInterfaceLoc,
+ IdentifierInfo *ClassName, SourceLocation ClassLoc,
+ IdentifierInfo *SuperName, SourceLocation SuperLoc,
+ IdentifierInfo **ProtocolNames, unsigned NumProtocols,
+ AttributeList *AttrList) {
+ assert(ClassName && "Missing class identifier");
+ ObjcInterfaceDecl *IDecl;
+
+ IDecl = new ObjcInterfaceDecl(AtInterfaceLoc, ClassName);
+
+ // Chain & install the interface decl into the identifier.
+ IDecl->setNext(ClassName->getFETokenInfo<Decl>());
+ ClassName->setFETokenInfo(IDecl);
+ return IDecl;
+}
+
+/// ObjcClassDeclaration -
+/// Scope will always be top level file scope.
+Action::DeclTy *
+Sema::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList, unsigned NumElts) {
+ ObjcClassDecl *CDecl = new ObjcClassDecl(AtClassLoc, NumElts);
+
+ for (unsigned i = 0; i != NumElts; ++i) {
+ ObjcInterfaceDecl *IDecl;
+
+ IDecl = new ObjcInterfaceDecl(SourceLocation(), IdentList[i], true);
+ // Chain & install the interface decl into the identifier.
+ IDecl->setNext(IdentList[i]->getFETokenInfo<Decl>());
+ IdentList[i]->setFETokenInfo(IDecl);
+
+ // Remember that this needs to be removed when the scope is popped.
+ S->AddDecl(IdentList[i]);
+
+ CDecl->setInterfaceDecl((int)i, IDecl);
+ }
+ return CDecl;
+}
+
/// ParseTag - This is invoked when we see 'struct foo' or 'struct {'. In the
/// former case, Name will be non-null. In the later case, Name will be null.
assert(DS.getTypeSpecWidth() == 0 && DS.getTypeSpecComplex() == 0 &&
DS.getTypeSpecSign() == 0 &&
"Can't handle qualifiers on typedef names yet!");
+ // FIXME: Adding a TST_objcInterface clause doesn't seem ideal, so
+ // we have this "hack" for now...
+ if (isa<ObjcInterfaceDecl>(D))
+ return Ctx.getObjcInterfaceType(cast<ObjcInterfaceDecl>(D));
// TypeQuals handled by caller.
return Ctx.getTypedefType(cast<TypedefDecl>(D));
}
/// getTypedefType - Return the unique reference to the type for the
/// specified typename decl.
QualType getTypedefType(TypedefDecl *Decl);
+ QualType getObjcInterfaceType(ObjcInterfaceDecl *Decl);
/// getTypeOfType - GCC extension.
QualType getTypeOfExpr(Expr *e);
// Concrete sub-classes of ValueDecl
Function, BlockVariable, FileVariable, ParmVariable, EnumConstant,
// Concrete sub-classes of TypeDecl
- Typedef, Struct, Union, Class, Enum,
+ Typedef, Struct, Union, Class, Enum, ObjcInterface, ObjcClass,
// Concrete sub-class of Decl
Field
};
static bool classof(const RecordDecl *D) { return true; }
};
+class ObjcInterfaceDecl : public TypeDecl {
+ /// Ivars/NumIvars - This is a new[]'d array of pointers to Decls.
+ FieldDecl **Ivars; // Null if not defined.
+ int NumIvars; // -1 if not defined.
+
+ bool isForwardDecl; // declared with @class.
+public:
+ ObjcInterfaceDecl(SourceLocation L, IdentifierInfo *Id, bool FD = false)
+ : TypeDecl(ObjcInterface, L, Id, 0), Ivars(0), NumIvars(-1),
+ isForwardDecl(FD) { }
+
+ void addInstanceVariable(FieldDecl ivar);
+
+ static bool classof(const Decl *D) {
+ return D->getKind() == ObjcInterface;
+ }
+ static bool classof(const ObjcInterfaceDecl *D) { return true; }
+};
+
+class ObjcClassDecl : public TypeDecl {
+ ObjcInterfaceDecl **ForwardDecls; // Null if not defined.
+ int NumForwardDecls; // -1 if not defined.
+public:
+ ObjcClassDecl(SourceLocation L, unsigned nElts)
+ : TypeDecl(ObjcClass, L, 0, 0) {
+ if (nElts) {
+ ForwardDecls = new ObjcInterfaceDecl*[nElts];
+ bzero(ForwardDecls, nElts*sizeof(ObjcInterfaceDecl*));
+ }
+ NumForwardDecls = nElts;
+ }
+ void setInterfaceDecl(int idx, ObjcInterfaceDecl *OID) {
+ assert((idx < NumForwardDecls) && "index out of range");
+ ForwardDecls[idx] = OID;
+ }
+ static bool classof(const Decl *D) {
+ return D->getKind() == ObjcClass;
+ }
+ static bool classof(const ObjcClassDecl *D) { return true; }
+};
+
} // end namespace clang
#endif
class TagDecl;
class RecordDecl;
class EnumDecl;
+ class ObjcInterfaceDecl;
class Expr;
class SourceLocation;
class PointerType;
Vector, OCUVector,
FunctionNoProto, FunctionProto,
TypeName, Tagged,
+ ObjcInterface,
TypeOfExp, TypeOfTyp // GNU typeof extension.
};
private:
static bool classof(const TagType *) { return true; }
};
+class ObjcInterfaceType : public Type {
+ ObjcInterfaceDecl *Decl;
+ ObjcInterfaceType(ObjcInterfaceDecl *D) :
+ Type(ObjcInterface, QualType()), Decl(D) { }
+ friend class ASTContext; // ASTContext creates these.
+public:
+
+ ObjcInterfaceDecl *getDecl() const { return Decl; }
+
+ virtual void getAsStringInternal(std::string &InnerString) const;
+
+ static bool classof(const Type *T) {
+ return T->getTypeClass() == ObjcInterface;
+ }
+ static bool classof(const ObjcInterfaceType *) { return true; }
+};
+
/// RecordType - This is a helper class that allows the use of isa/cast/dyncast
/// to detect TagType objects of structs/unions/classes.
class RecordType : public TagType {
return 0;
}
- virtual DeclTy *ParsedObjcClassDeclaration(Scope *S,
- IdentifierInfo **IdentList,
- unsigned NumElts) {
+ virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList,
+ unsigned NumElts) {
return 0;
}
AttributeList *AttrList) {
return 0;
}
- virtual void ObjCContinueClassInterface(SourceLocation InterfaceLoc) {
+ virtual void ObjcAddInstanceVariable(DeclTy *ClassDec, DeclTy *Ivars,
+ tok::ObjCKeywordKind visibility) {
return;
}
- virtual void ObjCStartCategoryInterface() {
- return;
- }
- virtual void ObjCFinishInterface() {
+ virtual void ObjcAddMethod(DeclTy *ClassDec, DeclTy *Meth,
+ AttributeList *AttrList) {
return;
}
virtual DeclTy *ObjcBuildMethodDeclaration(
SourceLocation MethodLoc, tok::TokenKind MethodType, TypeTy *ReturnType,
- ObjcKeywordInfo *Keywords, unsigned NumKeywords, AttributeList *attrs) {
+ ObjcKeywordInfo *Keywords, unsigned NumKeywords) {
return 0;
}
virtual DeclTy *ObjcBuildMethodDeclaration(
SourceLocation MethodLoc, tok::TokenKind MethodType, TypeTy *ReturnType,
- IdentifierInfo *SelectorName, AttributeList *attrs) {
+ IdentifierInfo *SelectorName) {
return 0;
}
+ virtual void ObjCStartCategoryInterface() { // FIXME
+ return;
+ }
+ virtual void ObjCFinishInterface() {
+ return;
+ }
//===----------------------- Obj-C Expressions --------------------------===//
virtual ExprResult ParseObjCStringLiteral(ExprTy *string) {
/// they are removed from the IdentifierInfo::FETokenInfo field.
virtual void PopScope(SourceLocation Loc, Scope *S);
- virtual DeclTy *ParsedObjcClassDeclaration(Scope *S,
- IdentifierInfo **IdentList,
- unsigned NumElts);
+ virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList,
+ unsigned NumElts);
+ virtual DeclTy *ObjcStartClassInterface(SourceLocation AtInterafceLoc,
+ IdentifierInfo *ClassName, SourceLocation ClassLoc,
+ IdentifierInfo *SuperName, SourceLocation SuperLoc,
+ IdentifierInfo **ProtocolNames, unsigned NumProtocols,
+ AttributeList *AttrList);
};
} // end namespace clang
void ParseSimpleAsm();
void ParseAsmStringLiteral();
- // Objective-C External Declarations
+ // Objective-C External Declarations
DeclTy *ParseObjCAtDirectives();
DeclTy *ParseObjCAtClassDeclaration(SourceLocation atLoc);
DeclTy *ParseObjCAtInterfaceDeclaration(SourceLocation atLoc,
AttributeList *prefixAttrs = 0);
- void ParseObjCClassInstanceVariables(DeclTy *interfaceDecl,
- llvm::SmallVectorImpl<DeclTy*> &IvarDecls);
+ void ParseObjCClassInstanceVariables(DeclTy *interfaceDecl);
bool ParseObjCProtocolReferences(llvm::SmallVectorImpl<IdentifierInfo*> &);
- void ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
- llvm::SmallVectorImpl<DeclTy*> &MethodDecls);
+ void ParseObjCInterfaceDeclList(DeclTy *interfaceDecl);
DeclTy *ParseObjCAtProtocolDeclaration(SourceLocation atLoc);
+
+ DeclTy *ObjcImpDecl;
DeclTy *ParseObjCAtImplementationDeclaration(SourceLocation atLoc);
DeclTy *ParseObjCAtEndDeclaration(SourceLocation atLoc);
DeclTy *ParseObjCAtAliasDeclaration(SourceLocation atLoc);
TypeTy *ParseObjCTypeName();
void ParseObjCMethodRequirement();
- DeclTy *ParseObjCMethodPrototype(bool decl);
+ DeclTy *ParseObjCMethodPrototype(DeclTy *classOrCat);
DeclTy *ParseObjCMethodDecl(tok::TokenKind mType, SourceLocation mLoc);
void ParseObjCPropertyAttribute(DeclTy *interfaceDecl);
void ParseObjCPropertyDecl(DeclTy *interfaceDecl);
-// RUN: clang %s -parse-noop -arch ppc
+// RUN: clang %s -arch ppc
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif