NewFD = new FieldDecl(Loc, II, T, BitWidth);
else if (isa<ObjcInterfaceDecl>(static_cast<Decl *>(TagDecl)) ||
isa<ObjcImplementationDecl>(static_cast<Decl *>(TagDecl)) ||
- isa<ObjcCategoryDecl>(static_cast<Decl *>(TagDecl)))
+ isa<ObjcCategoryDecl>(static_cast<Decl *>(TagDecl)) ||
+ // FIXME: ivars are currently used to model properties, and
+ // properties can appear within a protocol.
+ // See corresponding FIXME in DeclObjC.h:ObjcPropertyDecl.
+ isa<ObjcProtocolDecl>(static_cast<Decl *>(TagDecl)))
NewFD = new ObjcIvarDecl(Loc, II, T);
else
assert(0 && "Sema::ActOnField(): Unknown TagDecl");