]> granicus.if.org Git - clang/commitdiff
Make sure @property is allowed within a category.
authorSteve Naroff <snaroff@apple.com>
Mon, 12 Nov 2007 04:22:52 +0000 (04:22 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 12 Nov 2007 04:22:52 +0000 (04:22 +0000)
Bug submitted by Keith Bauer.

CookieJar:Desktop keith$ cat test.m
#import <WebKit/WebKit.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44007 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp

index ec88087f899b2fc75837ccaad336c42ef211cfc1..3933963a7171604f74ee9ce572f423f1f8db5803 100644 (file)
@@ -1763,8 +1763,9 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagDecl,
   
   if (isa<RecordDecl>(static_cast<Decl *>(TagDecl)))
     NewFD = new FieldDecl(Loc, II, T, BitWidth);
-  else if (isa<ObjcInterfaceDecl>(static_cast<Decl *>(TagDecl))
-           || isa<ObjcImplementationDecl>(static_cast<Decl *>(TagDecl)))
+  else if (isa<ObjcInterfaceDecl>(static_cast<Decl *>(TagDecl)) ||
+           isa<ObjcImplementationDecl>(static_cast<Decl *>(TagDecl)) ||
+           isa<ObjcCategoryDecl>(static_cast<Decl *>(TagDecl)))
     NewFD = new ObjcIvarDecl(Loc, II, T);
   else
     assert(0 && "Sema::ActOnField(): Unknown TagDecl");