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...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44117 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Steve Naroff 2007-11-14 14:15:31 +00:00
Родитель aad48b6b2d
Коммит ddd600f328
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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");