From 387ff7f8d6dae7ae39e73f4d7bc081a7f4fbca5d Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Tue, 26 Jan 2016 18:52:43 +0000 Subject: Class Property: parse property attribute (class). This is the third patch in a series of patches to support class properties in addition to instance properties in objective-c. rdar://23891898 llvm-svn: 258834 --- clang/lib/Sema/SemaObjCProperty.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Sema/SemaObjCProperty.cpp') diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index db37a754791..9a976e6e590 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -303,6 +303,8 @@ makePropertyAttributesAsWritten(unsigned Attributes) { attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_nonatomic; if (Attributes & ObjCDeclSpec::DQ_PR_atomic) attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_atomic; + if (Attributes & ObjCDeclSpec::DQ_PR_class) + attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_class; return (ObjCPropertyDecl::PropertyAttributeKind)attributesAsWritten; } @@ -691,6 +693,9 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, if (Attributes & ObjCDeclSpec::DQ_PR_null_resettable) PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_null_resettable); + if (Attributes & ObjCDeclSpec::DQ_PR_class) + PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_class); + return PDecl; } -- cgit v1.2.3