forked from OSchip/llvm-project
Allow properties within a protocol. The case below was asserting...now it works fine.
@protocol CAMediaTiming @property int beginTime; @end Comments in the code tell the rest of the story... llvm-svn: 44117
This commit is contained in:
parent
9e12a3f020
commit
9e0887cff4
|
@ -1742,7 +1742,11 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagDecl,
|
|||
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");
|
||||
|
|
Loading…
Reference in New Issue