Make sure @property is allowed within a category.
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
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index ec88087..3933963 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1763,8 +1763,9 @@
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");